124. 入门

Build 命令 line(并“安装”samples):

$ ./mvnw clean install

(如果你喜欢 YOLO 添加-DskipTests .)

运行其中一个 samples,e.g.

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

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

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

您可以通过用新 lines 分隔多个 strings(a Flux<String>)来转换它们

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

(您可以在终端中使用QJ来插入文字 string 中的新 line,如 that.)