Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2020-05-22 22:36:20 +00:00
parent 70b5753897
commit a9fc8cc708
4 changed files with 524 additions and 138 deletions

View File

@@ -217,20 +217,14 @@ to use. The next section will explain you how you can accomplish just that.</p>
<h4 id="_aws_request_handlers"><a class="link" href="#_aws_request_handlers">AWS Request Handlers</a></h4>
<div class="paragraph">
<p>The adapter has a couple of generic request handlers that you can use. The most generic is (and the one we used in the Getting Started section)
is <code>org.springframework.cloud.function.adapter.aws.FunctionInvoke</code> which is the implementation of AWS&#8217;s <code>RequestStreamHandler</code>.
is <code>org.springframework.cloud.function.adapter.aws.FunctionInvoker</code> which is the implementation of AWS&#8217;s <code>RequestStreamHandler</code>.
User doesn&#8217;t need to do anything other then specify it as 'handler' on AWS dashborad when deploying function.
It will handle most of the case including Kinesis, streaming etc. .</p>
</div>
<div class="paragraph">
<p>The most generic is
<code>SpringBootStreamHandler</code>, which uses a Jackson <code>ObjectMapper</code> provided by Spring Boot to serialize and deserialize the objects
in the function. There is also a <code>SpringBootRequestHandler</code> which you can extend, and provide the input and output types as type
parameters (enabling AWS to inspect the class and do the JSON conversions itself).</p>
</div>
<div class="paragraph">
<p>If your app has more than one <code>@Bean</code> of type <code>Function</code> etc. then you can choose the one to use by configuring <code>function.name</code>
(e.g. as <code>FUNCTION_NAME</code> environment variable in AWS). The functions are extracted from the Spring Cloud <code>FunctionCatalog</code>
(searching first for <code>Function</code> then <code>Consumer</code> and finally <code>Supplier</code>).</p>
<p>If your app has more than one <code>@Bean</code> of type <code>Function</code> etc. then you can choose the one to use by configuring <code>spring.cloud.function.definition</code>
property or environment variable. The functions are extracted from the Spring Cloud <code>FunctionCatalog</code>. In the event you don&#8217;t specify <code>spring.cloud.function.definition</code>
the framework will attempt to find a default following the search order where it searches first for <code>Function</code> then <code>Consumer</code> and finally <code>Supplier</code>).</p>
</div>
</div>
<div class="sect3">