diff --git a/README.adoc b/README.adoc index 3d99877fe..356b3a48f 100644 --- a/README.adoc +++ b/README.adoc @@ -100,6 +100,31 @@ HELLOWORLD (You can use `^Q^J` in a terminal to insert a new line in a literal string like that.) +== Building and Running a Function + +The sample `@SpringBootApplication` above has a function that can be +decorated at runtime by Spring Cloud Function to be an HTTP endpoint, +or a Stream processor, for instance with RabbitMQ, Apache Kafka or +JMS. + +The `@Beans` can be `Function`, `Consumer` or `Supplier` (all from +`java.util`), and their parametric types can be String or POJO. + +Functions can also be of `Flux` or `Flux` and Spring +Cloud Function takes care of converting the data to and from the +desired types, as long as it comes in as plain text or (in the case of +the POJO) JSON. There is also support for `Message` where the +message headers are copied from the incoming event, depending on the +adapter. The web adapter also supports conversion from form-encoded +data to a `Map`, and if you are using the function with Spring Cloud +Stream then all the conversion and coercion features for message +payloads will be applicable as well. + +Functions can be grouped together in a single application, or deployed +one-per-jar. It's up to the developer to choose. An app with multiple +functions can be deployed multiple times in different "personalities", +exposing different functions over different physical transports. + == Building :jdkversion: 1.7 diff --git a/docs/pom.xml b/docs/pom.xml index f906669ee..bd9b3c695 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -7,7 +7,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT pom Spring Cloud Function Docs diff --git a/pom.xml b/pom.xml index 282aae262..5ca7976b7 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ spring-cloud-function-parent Spring Cloud Function Parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT pom diff --git a/spring-cloud-function-adapters/pom.xml b/spring-cloud-function-adapters/pom.xml index a93d09cfc..1fdd84600 100644 --- a/spring-cloud-function-adapters/pom.xml +++ b/spring-cloud-function-adapters/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT spring-cloud-function-adapter-parent diff --git a/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/pom.xml b/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/pom.xml index 5b5ed8ce5..964e2d7d5 100644 --- a/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/pom.xml +++ b/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-function-adapter-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-adapters/spring-cloud-function-adapter-azure/pom.xml b/spring-cloud-function-adapters/spring-cloud-function-adapter-azure/pom.xml index 10c978e50..0b04eb84f 100644 --- a/spring-cloud-function-adapters/spring-cloud-function-adapter-azure/pom.xml +++ b/spring-cloud-function-adapters/spring-cloud-function-adapter-azure/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-function-adapter-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk/pom.xml b/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk/pom.xml index 32b476c94..510de9e1e 100644 --- a/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk/pom.xml +++ b/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk/pom.xml @@ -13,7 +13,7 @@ org.springframework.cloud spring-cloud-function-adapter-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-compiler/pom.xml b/spring-cloud-function-compiler/pom.xml index de2b0ca90..c7df2c205 100644 --- a/spring-cloud-function-compiler/pom.xml +++ b/spring-cloud-function-compiler/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-context/pom.xml b/spring-cloud-function-context/pom.xml index 2e6a2be6f..48a33cbc7 100644 --- a/spring-cloud-function-context/pom.xml +++ b/spring-cloud-function-context/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-core/pom.xml b/spring-cloud-function-core/pom.xml index 001a88933..fde8e88f9 100644 --- a/spring-cloud-function-core/pom.xml +++ b/spring-cloud-function-core/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-dependencies/pom.xml b/spring-cloud-function-dependencies/pom.xml index 2991d7cbc..8397228a5 100644 --- a/spring-cloud-function-dependencies/pom.xml +++ b/spring-cloud-function-dependencies/pom.xml @@ -10,7 +10,7 @@ spring-cloud-function-dependencies - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT pom Spring Cloud Function Dependencies Spring Cloud Function Dependencies diff --git a/spring-cloud-function-deployer/pom.xml b/spring-cloud-function-deployer/pom.xml index ed54cba01..fd7632ca0 100644 --- a/spring-cloud-function-deployer/pom.xml +++ b/spring-cloud-function-deployer/pom.xml @@ -10,7 +10,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-deployer/src/it/bootapp-multi/pom.xml b/spring-cloud-function-deployer/src/it/bootapp-multi/pom.xml index 3e8a4befe..fa547e1db 100644 --- a/spring-cloud-function-deployer/src/it/bootapp-multi/pom.xml +++ b/spring-cloud-function-deployer/src/it/bootapp-multi/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.17.RELEASE diff --git a/spring-cloud-function-deployer/src/it/bootapp-with-javax/pom.xml b/spring-cloud-function-deployer/src/it/bootapp-with-javax/pom.xml index c8a5a2cc8..d5d5f1a77 100644 --- a/spring-cloud-function-deployer/src/it/bootapp-with-javax/pom.xml +++ b/spring-cloud-function-deployer/src/it/bootapp-with-javax/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.17.RELEASE diff --git a/spring-cloud-function-deployer/src/it/bootapp-with-scf/pom.xml b/spring-cloud-function-deployer/src/it/bootapp-with-scf/pom.xml index b98ec450f..58b2ac955 100644 --- a/spring-cloud-function-deployer/src/it/bootapp-with-scf/pom.xml +++ b/spring-cloud-function-deployer/src/it/bootapp-with-scf/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.17.RELEASE diff --git a/spring-cloud-function-deployer/src/it/bootapp/pom.xml b/spring-cloud-function-deployer/src/it/bootapp/pom.xml index 8f4283ad1..05829a20e 100644 --- a/spring-cloud-function-deployer/src/it/bootapp/pom.xml +++ b/spring-cloud-function-deployer/src/it/bootapp/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.17.RELEASE diff --git a/spring-cloud-function-deployer/src/it/bootjar-multi/pom.xml b/spring-cloud-function-deployer/src/it/bootjar-multi/pom.xml index 488774ec6..24e44245e 100644 --- a/spring-cloud-function-deployer/src/it/bootjar-multi/pom.xml +++ b/spring-cloud-function-deployer/src/it/bootjar-multi/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.17.RELEASE diff --git a/spring-cloud-function-deployer/src/it/bootjar/pom.xml b/spring-cloud-function-deployer/src/it/bootjar/pom.xml index 7413c1fee..e7749a525 100644 --- a/spring-cloud-function-deployer/src/it/bootjar/pom.xml +++ b/spring-cloud-function-deployer/src/it/bootjar/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.17.RELEASE diff --git a/spring-cloud-function-deployer/src/it/bootjarnostart/pom.xml b/spring-cloud-function-deployer/src/it/bootjarnostart/pom.xml index c3a28c347..469700193 100644 --- a/spring-cloud-function-deployer/src/it/bootjarnostart/pom.xml +++ b/spring-cloud-function-deployer/src/it/bootjarnostart/pom.xml @@ -18,7 +18,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.17.RELEASE diff --git a/spring-cloud-function-kotlin/pom.xml b/spring-cloud-function-kotlin/pom.xml index 07f75b640..c69628f68 100644 --- a/spring-cloud-function-kotlin/pom.xml +++ b/spring-cloud-function-kotlin/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-samples/function-sample-aws-custom/pom.xml b/spring-cloud-function-samples/function-sample-aws-custom/pom.xml index 3d7cdc07d..55ab59eeb 100644 --- a/spring-cloud-function-samples/function-sample-aws-custom/pom.xml +++ b/spring-cloud-function-samples/function-sample-aws-custom/pom.xml @@ -17,7 +17,7 @@ 1.8 1.0.22.RELEASE - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-samples/function-sample-aws/pom.xml b/spring-cloud-function-samples/function-sample-aws/pom.xml index c6b2cd4a4..4b7651d44 100644 --- a/spring-cloud-function-samples/function-sample-aws/pom.xml +++ b/spring-cloud-function-samples/function-sample-aws/pom.xml @@ -25,7 +25,7 @@ 1.8 1.0.17.RELEASE 2.0.2 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT example.Config diff --git a/spring-cloud-function-samples/function-sample-compiler/pom.xml b/spring-cloud-function-samples/function-sample-compiler/pom.xml index 631939c47..b2b930bf4 100644 --- a/spring-cloud-function-samples/function-sample-compiler/pom.xml +++ b/spring-cloud-function-samples/function-sample-compiler/pom.xml @@ -20,7 +20,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 3.1.2.RELEASE 1.0.17.RELEASE diff --git a/spring-cloud-function-samples/function-sample-pof/pom.xml b/spring-cloud-function-samples/function-sample-pof/pom.xml index f766b3a7a..afba435b4 100644 --- a/spring-cloud-function-samples/function-sample-pof/pom.xml +++ b/spring-cloud-function-samples/function-sample-pof/pom.xml @@ -22,7 +22,7 @@ UTF-8 1.8 3.1.2.RELEASE - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-samples/function-sample-pojo/pom.xml b/spring-cloud-function-samples/function-sample-pojo/pom.xml index a5e68549e..d67846acd 100644 --- a/spring-cloud-function-samples/function-sample-pojo/pom.xml +++ b/spring-cloud-function-samples/function-sample-pojo/pom.xml @@ -20,7 +20,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.21.RELEASE diff --git a/spring-cloud-function-samples/function-sample-spring-integration/pom.xml b/spring-cloud-function-samples/function-sample-spring-integration/pom.xml index 1d7cabc1f..c3a7f1f78 100644 --- a/spring-cloud-function-samples/function-sample-spring-integration/pom.xml +++ b/spring-cloud-function-samples/function-sample-spring-integration/pom.xml @@ -20,7 +20,7 @@ UTF-8 UTF-8 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-samples/function-sample-task/pom.xml b/spring-cloud-function-samples/function-sample-task/pom.xml index 79f42ce2f..003391401 100644 --- a/spring-cloud-function-samples/function-sample-task/pom.xml +++ b/spring-cloud-function-samples/function-sample-task/pom.xml @@ -20,7 +20,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.10.RELEASE 3.1.2.RELEASE diff --git a/spring-cloud-function-samples/function-sample/pom.xml b/spring-cloud-function-samples/function-sample/pom.xml index f48a326df..23640485a 100644 --- a/spring-cloud-function-samples/function-sample/pom.xml +++ b/spring-cloud-function-samples/function-sample/pom.xml @@ -20,7 +20,7 @@ 1.8 - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT 1.0.17.RELEASE diff --git a/spring-cloud-function-samples/pom.xml b/spring-cloud-function-samples/pom.xml index 2788bd3ba..cb520aa39 100644 --- a/spring-cloud-function-samples/pom.xml +++ b/spring-cloud-function-samples/pom.xml @@ -11,7 +11,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-task/pom.xml b/spring-cloud-function-task/pom.xml index feb23338a..c56db5c63 100644 --- a/spring-cloud-function-task/pom.xml +++ b/spring-cloud-function-task/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-function-web/pom.xml b/spring-cloud-function-web/pom.xml index a1d9476fd..e88556c54 100644 --- a/spring-cloud-function-web/pom.xml +++ b/spring-cloud-function-web/pom.xml @@ -12,7 +12,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT diff --git a/spring-cloud-starter-function-web/pom.xml b/spring-cloud-starter-function-web/pom.xml index 38c75d589..801690788 100644 --- a/spring-cloud-starter-function-web/pom.xml +++ b/spring-cloud-starter-function-web/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT .. spring-cloud-starter-function-web diff --git a/spring-cloud-starter-function-webflux/pom.xml b/spring-cloud-starter-function-webflux/pom.xml index e3c279dfd..35ca1cee8 100644 --- a/spring-cloud-starter-function-webflux/pom.xml +++ b/spring-cloud-starter-function-webflux/pom.xml @@ -6,7 +6,7 @@ org.springframework.cloud spring-cloud-function-parent - 3.0.0.RELEASE + 3.0.0.BUILD-SNAPSHOT spring-cloud-starter-function-webflux spring-cloud-starter-function-webflux