diff --git a/README.adoc b/README.adoc index 95a0d3db9..2437b6c37 100644 --- a/README.adoc +++ b/README.adoc @@ -6,10 +6,10 @@ image::https://travis-ci.org/spring-cloud/spring-cloud-function.svg?branch=maste Spring Cloud Function is a project with the following high-level goals: -* _Promote the implementation of business logic via functions._ -* _Decouple the development lifecycle of business logic from any specific runtime target so that the same code can run as a web endpoint, a stream processor, or a task._ -* _Support a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS)._ -* _Enable Spring Boot features (auto-configuration, dependency injection, metrics) on serverless providers._ +* Promote the implementation of business logic via functions. +* Decouple the development lifecycle of business logic from any specific runtime target so that the same code can run as a web endpoint, a stream processor, or a task. +* Support a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS). +* Enable Spring Boot features (auto-configuration, dependency injection, metrics) on serverless providers. It abstracts away all of the transport details and infrastructure, allowing the developer to keep all the familiar tools diff --git a/docs/pom.xml b/docs/pom.xml index 54722c399..46f8b3132 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -30,6 +30,9 @@ docs + + ${main.basedir}/spring-cloud-function-adapters + @@ -46,11 +49,41 @@ com.agilejava.docbkx docbkx-maven-plugin - + org.apache.maven.plugins maven-antrun-plugin - false - + + + adapters + process-resources + + run + + + + + + + + + + + + + + + + + + + + + + + + + + org.codehaus.mojo build-helper-maven-plugin diff --git a/pom.xml b/pom.xml index c737d2ac3..9558f5bfc 100644 --- a/pom.xml +++ b/pom.xml @@ -177,54 +177,6 @@ - - - docs - - ${main.basedir}/spring-cloud-function-adapters - - - - - org.apache.maven.plugins - maven-antrun-plugin - - - adapters - process-resources - - run - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - spring-snapshots diff --git a/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/README.adoc b/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/README.adoc index 636daf25e..af8a6796f 100644 --- a/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/README.adoc +++ b/spring-cloud-function-adapters/spring-cloud-function-adapter-aws/README.adoc @@ -6,20 +6,18 @@ The adapter has a couple of generic request handlers that you can use. The most If your app has more than one `@Bean` of type `Function` etc. then you can choose the one to use by configuring `function.name` (e.g. as `FUNCTION_NAME` environment variable in AWS). The functions are extracted from the Spring Cloud `FunctionCatalog` (searching first for `Function` then `Consumer` and finally `Supplier`). -=== Notes on JAR Layout +== Notes on JAR Layout -You don't need the Spring Cloud Function Web or Stream adapter at runtime in Lambda, so you might need to exclude those before you create the JAR you send to AWS. A Lambda application has to be shaded, but a Spring Boot standalone application does not, so you can run the same app using 2 separate jars (as per the sample here). The sample app creates 2 jar files, one with an `aws` classifier for deploying in Lambda, and one executable (thin) jar that includes `spring-cloud-function-web` at runtime. Spring Cloud Function will try and locate a "main class" for you from the JAR file manifest, using the `Start-Class` attribute (which will be added for you by the Spring Boot tooling if you use the starter parent). If there is no `Start-Class` in your manifest you can use an environment variable `MAIN_CLASS` when you deploy the function to AWS. - -== Build - ----- -./mvnw -U clean package ----- +You don't need the Spring Cloud Function Web or Stream adapter at runtime in Lambda, so you might need to exclude those before you create the JAR you send to AWS. A Lambda application has to be shaded, but a Spring Boot standalone application does not, so you can run the same app using 2 separate jars (as per the sample). The sample app creates 2 jar files, one with an `aws` classifier for deploying in Lambda, and one executable (thin) jar that includes `spring-cloud-function-web` at runtime. Spring Cloud Function will try and locate a "main class" for you from the JAR file manifest, using the `Start-Class` attribute (which will be added for you by the Spring Boot tooling if you use the starter parent). If there is no `Start-Class` in your manifest you can use an environment variable `MAIN_CLASS` when you deploy the function to AWS. == Upload Build the sample under `spring-cloud-function-samples/function-sample-aws` and upload the `-aws` jar file to Lambda. The handler can be `example.Handler` or `org.springframework.cloud.function.adapter.aws.SpringBootStreamHandler` (FQN of the class, _not_ a method reference, although Lambda does accept method references). +---- +./mvnw -U clean package +---- + Using the AWS command line tools it looks like this: ----