--spring.cloud.function.definition=uppercase|reverse+
diff --git a/reference/html/spring-cloud-function.html b/reference/html/spring-cloud-function.html index fef5680b0..b24627359 100644 --- a/reference/html/spring-cloud-function.html +++ b/reference/html/spring-cloud-function.html @@ -103,6 +103,7 @@ $(addBlockSwitches);
Function Composition is a feature that allows one to compose several functions into one. +The core support is based on function composition feature available with Function.andThen(..) +support available since Java 8. However on top of it, we provide few additional features.
+This feature allows you to provide composition instruction in a declarative way using | (pipe) or , (comma) delimiter
+when providing spring.cloud.function.definition property.
For example
+--spring.cloud.function.definition=uppercase|reverse+
Here we effectively provided a definition of a single function which itself is a composition of
+function uppercase and function reverse. In fact that is one of the reasons why the property name is definition and not name,
+since the definition of a function can be a composition of several named functions.
+And as mentioned you can use , instead of pipe (such as …definition=uppercase,reverse).
Spring Cloud Function also supports composing Supplier with Consumer or Function as well as Function with Consumer.
+What’s important here is to understand the end product of such definitions.
+Composing Supplier with Function still results in Supplier while composing Supplier with Consumer will effectively render Runnable.
+Following the same logic composing Function with Consumer will result in Consumer.
And of course you can’t compose uncomposable such as Consumer and Function, Consumer and Supplier etc.
+Since version 2.2 Spring Cloud Function provides routing feature allowing