125. Getting Started

从命令行构建(并“安装”示例):

$ ./mvnw clean install

(如果您希望 YOLO 添加-DskipTests.)

运行其中一个 samples,例如

$ java -jar spring-cloud-function-samples/function-sample/target/*.jar

这将运行该应用程序并通过 HTTP 公开其功能,因此您可以将字符串转换为大写,如下所示:

$ curl -H "Content-Type: text/plain" localhost:8080/uppercase -d Hello
HELLO

您可以通过用新行分隔多个字符串(Flux<String>)来转换它们

$ curl -H "Content-Type: text/plain" localhost:8080/uppercase -d 'Hello
> World'
HELLOWORLD

(您可以在终端中使用QJ在这样的 Literals 字符串中插入新行.)