` bean (or a `Function uppercase(ExecutionContext targetContext) {
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
+==== 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
@@ -53,7 +56,7 @@ it doesn't hurt to leave it in. A function application on Azure is an archive ge
the handler classes. If you prefer you can just use a regular flat JAR file.
The dependencies should *not* be included.
-== Build file setup
+==== Build file setup
In order to run Spring Cloud Function applications on Microsoft Azure, you can leverage the Maven
plugin offered by the cloud platform provider.
@@ -106,13 +109,13 @@ applications to Microsoft Azure with Maven https://github.com/spring-cloud/sprin
NOTE: As of yet, only Maven plugin is available. Gradle plugin has not been created by
the cloud platform provider.
-== Build
+==== Build
----
./mvnw -U clean package
----
-== Running the sample
+==== Running the sample
You can run the sample locally, just like the other Spring Cloud Function samples:
diff --git a/docs/src/main/asciidoc/adapters/azure.adoc b/docs/src/main/asciidoc/adapters/azure.adoc
index efbb65533..4500c751b 100644
--- a/docs/src/main/asciidoc/adapters/azure.adoc
+++ b/docs/src/main/asciidoc/adapters/azure.adoc
@@ -1,8 +1,5 @@
*{spring-cloud-function-version}*
-[#index-link]
-{docs-url}spring-cloud-function/{docs-version}home.html
-
The https://azure.microsoft.com[Azure] adapter bootstraps a Spring Cloud Function context and channels function calls from the Azure framework into the user functions, using Spring Boot configuration where necessary. Azure Functions has quite a unique, but invasive programming model, involving annotations in user code that are specific to the platform. The easiest way to use it with Spring Cloud is to extend a base class and write a method in it with the `@FunctionName` annotation which delegates to a base class method.
diff --git a/docs/src/main/asciidoc/adapters/openwhisk.adoc b/docs/src/main/asciidoc/adapters/openwhisk.adoc
index 2c5d35118..bc9df457d 100644
--- a/docs/src/main/asciidoc/adapters/openwhisk.adoc
+++ b/docs/src/main/asciidoc/adapters/openwhisk.adoc
@@ -1,8 +1,5 @@
*{spring-cloud-function-version}*
-[#index-link]
-{docs-url}spring-cloud-function/{docs-version}home.html
-
The https://openwhisk.apache.org/[OpenWhisk] adapter is in the form of an executable jar that can be used in a a docker image to be deployed to Openwhisk. The platform works in request-response mode, listening on port 8080 on a specific endpoint, so the adapter is a simple Spring MVC application.
diff --git a/docs/src/main/asciidoc/home.adoc b/docs/src/main/asciidoc/home.adoc
deleted file mode 100644
index 96aabfa75..000000000
--- a/docs/src/main/asciidoc/home.adoc
+++ /dev/null
@@ -1,21 +0,0 @@
-= Spring Cloud Function Reference Documentation
-Mark Fisher, Dave Syer, Oleg Zhurakousky, Anshul Mehra
-
-*{spring-cloud-function-version}*
-
-:docinfo: shared
-
-The reference documentation consists of the following sections:
-
-[horizontal]
-<> :: Spring Cloud Function Reference
-<> :: AWS Adapter Reference
-<> :: Azure Adapter Reference
-<> :: Apache OpenWhisk Adapter Reference
-
-
-Relevant Links:
-
-[horizontal]
-https://projectreactor.io/[Reactor] :: Project Reactor
-https://projectriff.io/[riff] :: Project riff
diff --git a/docs/src/main/asciidoc/index.adoc b/docs/src/main/asciidoc/index.adoc
deleted file mode 120000
index 58aa1344f..000000000
--- a/docs/src/main/asciidoc/index.adoc
+++ /dev/null
@@ -1 +0,0 @@
-spring-cloud-function.adoc
\ No newline at end of file
diff --git a/docs/src/main/asciidoc/index.adoc b/docs/src/main/asciidoc/index.adoc
new file mode 100644
index 000000000..96aabfa75
--- /dev/null
+++ b/docs/src/main/asciidoc/index.adoc
@@ -0,0 +1,21 @@
+= Spring Cloud Function Reference Documentation
+Mark Fisher, Dave Syer, Oleg Zhurakousky, Anshul Mehra
+
+*{spring-cloud-function-version}*
+
+:docinfo: shared
+
+The reference documentation consists of the following sections:
+
+[horizontal]
+<> :: Spring Cloud Function Reference
+<> :: AWS Adapter Reference
+<> :: Azure Adapter Reference
+<> :: Apache OpenWhisk Adapter Reference
+
+
+Relevant Links:
+
+[horizontal]
+https://projectreactor.io/[Reactor] :: Project Reactor
+https://projectriff.io/[riff] :: Project riff
diff --git a/docs/src/main/asciidoc/spring-cloud-function.adoc b/docs/src/main/asciidoc/spring-cloud-function.adoc
index b1ebe0816..5bcff77e9 100644
--- a/docs/src/main/asciidoc/spring-cloud-function.adoc
+++ b/docs/src/main/asciidoc/spring-cloud-function.adoc
@@ -11,9 +11,6 @@ Mark Fisher, Dave Syer, Oleg Zhurakousky, Anshul Mehra
:docslink: {githubmaster}/docs/src/main/asciidoc
:nofooter:
-[#index-link]
-{docs-url}spring-cloud-function/{docs-version}home.html
-
== Introduction
include::_intro.adoc[]
@@ -201,9 +198,20 @@ Please refer to https://docs.spring.io/spring-cloud-stream/docs/current/referenc
Spring Cloud Function provides a "deployer" library that allows you to launch a jar file (or exploded archive, or set of jar files) with an isolated class loader and expose the functions defined in it. This is quite a powerful tool that would allow you to, for instance, adapt a function to a range of different input-output adapters without changing the target jar file. Serverless platforms often have this kind of feature built in, so you could see it as a building block for a function invoker in such a platform (indeed the https://projectriff.io[Riff] Java function invoker uses this library).
-The standard entry point is to add `spring-cloud-function-deployer` to the classpath, the deployer kicks in and looks for some configuration to tell it where to find the function jar. At a minimum the user has to provide a `spring.cloud.function.location` which is a URL or resource location for the archive containing the functions. It can optionally use a `maven:` prefix to locate the artifact via a dependency lookup (see `FunctionProperties` for complete details). A Spring Boot application is bootstrapped from the jar file, using the `MANIFEST.MF` to locate a start class, so that a standard Spring Boot fat jar works well, for example. If the target jar can be launched successfully then the result is a function registered in the main application's `FunctionCatalog`. The registered function can be applied by code in the main application, even though it was created in an isolated class loader (by deault).
+The standard entry point is to add `spring-cloud-function-deployer` to the classpath, the deployer kicks in and looks for some configuration to tell it where to find the function jar.
-Here is the example of deploying a JAR which contains an 'uppercase' function and invoking it .
+```xml
+
+ org.springframework.cloud
+ spring-cloud-function-deployer
+ ${spring.cloud.function.version}
+
+```
+
+
+At a minimum the user has to provide a `spring.cloud.function.location` which is a URL or resource location for the archive containing the functions. It can optionally use a `maven:` prefix to locate the artifact via a dependency lookup (see `FunctionProperties` for complete details). A Spring Boot application is bootstrapped from the jar file, using the `MANIFEST.MF` to locate a start class, so that a standard Spring Boot fat jar works well, for example. If the target jar can be launched successfully then the result is a function registered in the main application's `FunctionCatalog`. The registered function can be applied by code in the main application, even though it was created in an isolated class loader (by deault).
+
+Here is the example of deploying a JAR which contains an 'uppercase' function and invoking it .
```java
@SpringBootApplication
@@ -333,3 +341,6 @@ https://projectriff.io[Riff] supports Java functions and its
https://github.com/projectriff/java-function-invoker[Java Function
Invoker] acts natively is an adapter for Spring Cloud Function jars.
+include::adapters/aws-intro.adoc[]
+include::adapters/azure-intro.adoc[]
+
diff --git a/spring-cloud-function-deployer/src/main/java/org/springframework/cloud/function/deployer/EnableFunctionDeployer.java b/spring-cloud-function-deployer/src/main/java/org/springframework/cloud/function/deployer/EnableFunctionDeployer.java
new file mode 100644
index 000000000..233dfc223
--- /dev/null
+++ b/spring-cloud-function-deployer/src/main/java/org/springframework/cloud/function/deployer/EnableFunctionDeployer.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2012-2019 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.cloud.function.deployer;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.springframework.context.annotation.Import;
+
+/**
+ * Annotation to be used on a Spring Boot application if it wants to deploy a jar file
+ * containing a function definition.
+ * @author Dave Syer
+ *
+ * @deprecated since 3.0. No longer required. Deployer will kick in simply by including
+ * spring-cloud-function-deployer dependency
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Import(FunctionDeployerConfiguration.class)
+@Deprecated
+public @interface EnableFunctionDeployer {
+
+}