uppercase(ExecutionContext targetContext) { + return foo -> { + targetContext.getLogger().info("Invoking 'uppercase' on " + foo.getValue()); + return new Bar(foo.getValue().toUpperCase()); + }; +} +``` +Normally type-based injection should suffice, however if need to you can also utilise the bean name under which it is registered which is `targetExecutionContext`. + + === Notes on JAR Layout You don't need the Spring Cloud Function Web at runtime in Azure, so you can exclude this before you create the JAR you deploy to Azure, but it won't be used if you include it so it doesn't hurt to leave it in. A function application on Azure is an archive generated by the Maven plugin. The function lives in the JAR file generated by this project. The sample creates it as an executable jar, using the thin layout, so that Azure can find the handler classes. If you prefer you can just use a regular flat JAR file. The dependencies should *not* be included. diff --git a/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk/README.adoc b/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk/README.adoc index 03fe38d75..dec0252f2 100644 --- a/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk/README.adoc +++ b/spring-cloud-function-adapters/spring-cloud-function-adapter-openwhisk/README.adoc @@ -1,4 +1,8 @@ -// Do not edit this file (e.g. go instead to src/main/asciidoc) +//// +DO NOT EDIT THIS FILE. IT WAS GENERATED. +Manual changes to this file will be lost when it is generated again. +Edit the files in the src/main/asciidoc/ directory instead. +//// == Quick Start