From 2abd5faa4ba8324625468bcfbfe4289a5cf2ce0d Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Mon, 8 Apr 2019 15:43:43 +0200 Subject: [PATCH] Updated documentation for GH-349 --- .../src/main/asciidoc/adapters/aws-intro.adoc | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/adapters/aws-intro.adoc b/docs/src/main/asciidoc/adapters/aws-intro.adoc index 8d60da627..5897d30a0 100644 --- a/docs/src/main/asciidoc/adapters/aws-intro.adoc +++ b/docs/src/main/asciidoc/adapters/aws-intro.adoc @@ -36,4 +36,27 @@ The input type for the function in the AWS sample is a Foo with a single propert } ---- -NOTE: The AWS sample app is written in the "functional" style (as an `ApplicationContextInitializer`). This is much faster on startup in Lambda than the traditional `@Bean` style, so if you don't need `@Beans` (or `@EnableAutoConfiguration`) it's a good choice. Warm starts are not affected. \ No newline at end of file +NOTE: The AWS sample app is written in the "functional" style (as an `ApplicationContextInitializer`). This is much faster on startup in Lambda than the traditional `@Bean` style, so if you don't need `@Beans` (or `@EnableAutoConfiguration`) it's a good choice. Warm starts are not affected. + + +== Type Conversion + +Spring Cloud Function will attempt to transparently handle type conversion between the raw +input stream and types declared by your function. + +For example, if your function signature is as such `Function` we will attempt to convert +incoming stream event to an instance of `Foo`. + +In the event type is not known or can not be determined (e.g., `Function`) we will attempt to +convert an incoming stream event to a generic `Map`. + +==== Raw Input + +There are times when you may want to have access to a raw input. In this case all you need is to declare your +function signature to accept `InputStream`. For example, `Function`. In this case +we will not attempt any conversion and will pass the raw input directly to a function. + + + + +