Fix antor warnings

This commit is contained in:
Oleg Zhurakousky
2023-09-12 16:35:46 +02:00
parent 8b1b83be03
commit e327d6ef2a
9 changed files with 331 additions and 222 deletions

View File

@@ -9,7 +9,7 @@
*** xref:adapters/aws-intro.adoc[]
*** xref:adapters/azure-intro.adoc[]
*** xref:adapters/gcp-intro.adoc[]
** xref:spring-cloud-function/apendix.adoc[]
** xref:spring-cloud-function/appendix.adoc[]
*** https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-samples/function-sample-cloudevent[Cloud Events support]
*** https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-rsocket[RSocket support]
*** xref:spring-integration.adoc[Spring Integration]

View File

@@ -259,7 +259,7 @@ You can use the Spring Boot Maven Plugin to generate the <<thin-jar>>.
----
You can find the entire sample `pom.xml` file for deploying Spring Cloud Function
applications to AWS Lambda with Maven https://github.com/spring-cloud/spring-cloud-function/blob/{branch}/spring-cloud-function-samples/function-sample-aws/pom.xml[here].
applications to AWS Lambda with Maven https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-samples/function-sample-aws/pom.xml[here].
[[gradle]]
=== Gradle
@@ -328,4 +328,4 @@ assemble.dependsOn = [thinJar]
----
You can find the entire sample `build.gradle` file for deploying Spring Cloud Function
applications to AWS Lambda with Gradle https://github.com/spring-cloud/spring-cloud-function/blob/{branch}/spring-cloud-function-samples/function-sample-aws/build.gradle[here].
applications to AWS Lambda with Gradle https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-samples/function-sample-aws/build.gradle[here].

View File

@@ -202,6 +202,7 @@ Plugins are used to set the platform, runtime and app-settings properties like t
======
Maven::
+
[source,xml,indent=0,subs="verbatim,attributes",role="primary"]
----
<plugin>
@@ -243,6 +244,7 @@ Maven::
Gradle::
+
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
----
plugins {
@@ -312,6 +314,7 @@ You can use the Maven `start-class` property or set the `Main-Class` attribute o
======
Maven::
+
[source,xml,indent=0,subs="verbatim,attributes",role="primary"]
----
<properties>
@@ -322,6 +325,7 @@ Maven::
Gradle::
+
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
----
jar {
@@ -372,7 +376,7 @@ Here is a list of various Spring Cloud Function Azure Adapter samples you can ex
- https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-samples/function-sample-azure-kafka-trigger[ Kafka Trigger & Output Binding (Maven)].
[[azure.web.adapter]]
= Azure Web Adapter
== Azure Web Adapter
For, pure, Web-based function applications, you can replace the generic `adapter-azure` with the specialized https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-adapters/spring-cloud-function-adapter-azure-web[spring-cloud-function-adapter-azure-web].
The Azure Web Adapter can deploy any Spring Web application as a native Azure function, using the HttpTrigger internally.
@@ -414,7 +418,7 @@ For further information, explore the following, Azure Web Adapter, sample:
- https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-samples/function-sample-azure-web[ Azure Web Adapter (Maven)].
[[azure.usage]]
= Usage
== Usage
Common instructions for building and deploying both, `Azure Adapter` and `Azure Web Adapter` type of applications.
@@ -485,6 +489,7 @@ Maven::
Gradle::
+
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
----
./gradlew azureFunctionsDeploy
@@ -500,6 +505,7 @@ Run the function in debug mode.
======
Maven::
+
[source,xml,indent=0,subs="verbatim,attributes",role="primary"]
----
./mvnw azure-functions:run -DenableDebug
@@ -507,6 +513,7 @@ Maven::
Gradle::
+
[source,groovy,indent=0,subs="verbatim,attributes",role="secondary"]
----
// If you want to debug your functions, please add the following line
@@ -551,14 +558,14 @@ Here is snippet for a `VSCode` remote debugging configuration:
----
[[functioninvoker-deprecated]]
= FunctionInvoker (deprecated)
== FunctionInvoker (deprecated)
WARNING: The legacy `FunctionInvoker` programming model is deprecated and will not be supported going forward.
For additional documentation and samples about the Function Integration approach follow the https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-samples/function-sample-azure/[azure-sample] README and code.
[[relevant-links]]
= Relevant Links
== Relevant Links
- https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/getting-started-with-spring-cloud-function-in-azure[Spring Cloud Function in Azure]
- https://spring.io/blog/2023/02/24/spring-cloud-function-for-azure-function[Spring Cloud Function for Azure Function (blog)]

View File

@@ -5,7 +5,7 @@ The Google Cloud Functions adapter enables Spring Cloud Function apps to run on
You can either run the function locally using the open source https://github.com/GoogleCloudPlatform/functions-framework-java[Google Functions Framework for Java] or on GCP.
[[project-dependencies]]
=== Project Dependencies
== Project Dependencies
Start by adding the `spring-cloud-function-adapter-gcp` dependency to your project.
@@ -63,12 +63,12 @@ NOTE: The function target should always be set to `org.springframework.cloud.fun
A full example of a working `pom.xml` can be found in the https://github.com/spring-cloud/spring-cloud-function/blob/master/spring-cloud-function-samples/function-sample-gcp-http/pom.xml[Spring Cloud Functions GCP sample].
[[http-functions]]
=== HTTP Functions
== HTTP Functions
Google Cloud Functions supports deploying https://cloud.google.com/functions/docs/writing/http[HTTP Functions], which are functions that are invoked by HTTP request. The sections below describe instructions for deploying a Spring Cloud Function as an HTTP Function.
[[getting-started]]
=== Getting Started
== Getting Started
Lets start with a simple Spring Cloud Function example:
@@ -108,8 +108,8 @@ Invoke the HTTP function:
curl http://localhost:8080/ -d "hello"
----
[[deploy-to-gcp]]
=== Deploy to GCP
== Buikd & Deploy to GCP
Start by packaging your application.
@@ -171,8 +171,8 @@ The `spring-cloud-function-adapter-gcp` allows for functions to be deployed as b
The sections below describe the process for writing a Cloud Pub/Sub topic background function.
However, there are a number of different event types that can trigger a background function to execute which are not discussed here; these are described in the https://cloud.google.com/functions/docs/calling[Background Function triggers documentation].
[[getting-started]]
=== Getting Started
== GCP Getting Started
Lets start with a simple Spring Cloud Function which will run as a GCF background function:
@@ -265,7 +265,7 @@ curl localhost:8080 -H "Content-Type: application/json" -d '{"data":"hello"}'
Verify that the function was invoked by viewing the logs.
[[deploy-to-gcp]]
=== Deploy to GCP
== Deploy to GCP
In order to deploy your background function to GCP, first package your application.

View File

@@ -7,7 +7,9 @@ Spring Cloud Function supports a "functional" style of bean declarations for sma
Here's a vanilla Spring Cloud Function application from with the
familiar `@Configuration` and `@Bean` declaration style:
```java
[source,json]
----
@SpringBootApplication
public class DemoApplication {
@@ -21,12 +23,13 @@ public class DemoApplication {
}
}
```
----
Now for the functional beans: the user application code can be recast into "functional"
form, like this:
```java
[source,json]
----
@SpringBootConfiguration
public class DemoApplication implements ApplicationContextInitializer<GenericApplicationContext> {
@@ -46,7 +49,7 @@ public class DemoApplication implements ApplicationContextInitializer<GenericApp
}
}
```
----
The main differences are:
@@ -71,7 +74,8 @@ it is lost unless we use a `FunctionRegistration`.
An alternative to using an `ApplicationContextInitializer` and `FunctionRegistration` is to make the application
itself implement `Function` (or `Consumer` or `Supplier`). Example (equivalent to the above):
```java
[source,json]
----
@SpringBootConfiguration
public class DemoApplication implements Function<String, String> {
@@ -85,7 +89,7 @@ public class DemoApplication implements Function<String, String> {
}
}
```
----
It would also work if you add a separate, standalone class of type `Function` and register it with
the `SpringApplication` using an alternative form of the `run()` method. The main thing is that the generic
@@ -276,7 +280,6 @@ And to help with correct dependencies here is the excerpt from POM
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>{spring-boot-version}</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
. . . .

View File

@@ -1,5 +1,5 @@
[[apendix]]
= Apendix
[[appendix]]
= Appendix
:page-section-summary-toc: 1
Relevant Links:

View File

@@ -5,5 +5,5 @@
As well as being able to run as standalone process, Spring Cloud
Function application can be adapted to run one of the existing
serverless platforms. In the project there are adapters for
https://github.com/spring-cloud/spring-cloud-function/tree/{branch}/spring-cloud-function-adapters/spring-cloud-function-adapter-aws[AWS
Lambda], and https://github.com/spring-cloud/spring-cloud-function/tree/{branch}/spring-cloud-function-adapters/spring-cloud-function-adapter-azure[Azure].
https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-adapters/spring-cloud-function-adapter-aws[AWS
Lambda], and https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-adapters/spring-cloud-function-adapter-azure[Azure].

View File

@@ -21,13 +21,13 @@ It is primarily to accommodate _stateless serverless patterns_ where you simply
|===
| Method | Path | Request | Response | Status
| GET | /{supplier} | - | Items from the named supplier | 200 OK
| POST | /{consumer} | JSON object or text | Mirrors input and pushes request body into consumer | 202 Accepted
| PUT | /{consumer} | JSON object or text | Mirrors input and pushes request body into consumer | 202 Accepted
| DELETE | /{consumer} | JSON object or text | - | 204 NO CONTENT
| POST | /{function} | JSON object or text | The result of applying the named function | 200 OK
| PUT | /{function} | JSON object or text | The result of applying the named function | 200 OK
| GET | /{function}/{item} | - | Convert the item into an object and return the result of applying the function | 200 OK
| GET | /\{supplier} | - | Items from the named supplier | 200 OK
| POST | /\{consumer} | JSON object or text | Mirrors input and pushes request body into consumer | 202 Accepted
| PUT | /\{consumer} | JSON object or text | Mirrors input and pushes request body into consumer | 202 Accepted
| DELETE | /\{consumer} | JSON object or text | - | 204 NO CONTENT
| POST | /\{function} | JSON object or text | The result of applying the named function | 200 OK
| PUT | /\{function} | JSON object or text | The result of applying the named function | 200 OK
| GET | /\{function}/\{item} | - | Convert the item into an object and return the result of applying the function | 200 OK
|===
@@ -42,8 +42,8 @@ When POSTing text the response format might be different with Spring Boot 2.0 an
See <<Testing Functional Applications>> to see the details and example on how to test such application.
[[http-request-parameters]]
=== HTTP Request Parameters
As you have noticed from the previous table, you can pass an argument to a function as path variable (i.e., `/{function}/{item}`).
== HTTP Request Parameters
As you have noticed from the previous table, you can pass an argument to a function as path variable (i.e., `/\{function}/\{item}`).
For example, `http://localhost:8080/uppercase/foo` will result in calling `uppercase` function with its input parameter being `foo`.
While this is the recommended approach and the one that fits most use cases cases, there are times when you have to deal with HTTP request parameters (e.g., `http://localhost:8080/uppercase/foo?name=Bill`)