Skip to content

Commit 26e507f

Browse files
authored
Merge pull request #1132 from render3d/style/doc-typos
Style: corrects obvious typos in docs
2 parents 645c7e8 + fccd2c6 commit 26e507f

File tree

6 files changed

+16
-16
lines changed

6 files changed

+16
-16
lines changed

docs/modules/ROOT/pages/adapters/aws-intro.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ appropriate AWS deployable JAR file. (You can read more details about JAR layout
4444

4545
Then you have to upload the JAR file (via AWS dashboard or AWS CLI) to AWS.
4646

47-
When ask about _handler_ you specify `org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest` which is a generic request handler.
47+
When asked about _handler_ you specify `org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest` which is a generic request handler.
4848

4949
image::AWS-deploy.png[width=800,scaledwidth="75%",align="center"]
5050

@@ -62,7 +62,7 @@ to use. The next section will explain you how you can accomplish just that.
6262
While AWS Lambda allows you to implement various `RequestHandlers`, with Spring Cloud Function you don't need to implement any, and instead use the provided
6363
`org.springframework.cloud.function.adapter.aws.FunctionInvoker` which is the implementation of AWS's `RequestStreamHandler`.
6464
User doesn't need to do anything other then specify it as 'handler' on AWS dashboard when deploying function.
65-
It will handle most of the case including Kinesis, streaming etc. .
65+
It will handle most of the cases including Kinesis, streaming etc.
6666

6767

6868
If your app has more than one `@Bean` of type `Function` etc. then you can choose the one to use by configuring `spring.cloud.function.definition`
@@ -133,10 +133,10 @@ java -Dspring.main.web-application-type=none -Dspring.jmx.enabled=false \
133133
```
134134
The `com.example.LambdaApplication` represents your application which contains function beans.
135135

136-
Set the handler name in AWS to the name of your function. You can use function composition here as well (e.g., `uppecrase|reverse`).
136+
Set the handler name in AWS to the name of your function. You can use function composition here as well (e.g., `uppercase|reverse`).
137137
That is pretty much all. Once you upload your zip/jar to AWS your function will run in custom runtime.
138138
We provide a https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-samples/function-sample-aws-custom-new[sample project]
139-
where you can also see how to configure yoru POM to properly generate the zip file.
139+
where you can also see how to configure your POM to properly generate the zip file.
140140

141141
The functional bean definition style works for custom runtimes as well, and is
142142
faster than the `@Bean` style. A custom runtime can start up much quicker even than a functional bean implementation

docs/modules/ROOT/pages/adapters/aws.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ appropriate AWS deployable JAR file. (You can read more details about JAR layout
4747

4848
Then you have to upload the JAR file (via AWS dashboard or AWS CLI) to AWS.
4949

50-
When ask about _handler_ you specify `org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest` which is a generic request handler.
50+
When asked about _handler_ you specify `org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest` which is a generic request handler.
5151

5252
image::AWS-deploy.png[width=800,scaledwidth="75%",align="center"]
5353

@@ -65,7 +65,7 @@ to use. The next section will explain you how you can accomplish just that.
6565
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)
6666
is `org.springframework.cloud.function.adapter.aws.FunctionInvoker` which is the implementation of AWS's `RequestStreamHandler`.
6767
User doesn't need to do anything other then specify it as 'handler' on AWS dashboard when deploying function.
68-
It will handle most of the case including Kinesis, streaming etc. .
68+
It will handle most of the cases including Kinesis, streaming etc.
6969

7070

7171
If your app has more than one `@Bean` of type `Function` etc. then you can choose the one to use by configuring `spring.cloud.function.definition`
@@ -143,10 +143,10 @@ java -Dspring.main.web-application-type=none -Dspring.jmx.enabled=false \
143143
```
144144
The `com.example.LambdaApplication` represents your application which contains function beans.
145145

146-
Set the handler name in AWS to the name of your function. You can use function composition here as well (e.g., `uppecrase|reverse`).
146+
Set the handler name in AWS to the name of your function. You can use function composition here as well (e.g., `uppercase|reverse`).
147147
That is pretty much all. Once you upload your zip/jar to AWS your function will run in custom runtime.
148148
We provide a https://github.com/spring-cloud/spring-cloud-function/tree/master/spring-cloud-function-samples/function-sample-aws-custom-new[sample project]
149-
where you can also see how to configure yoru POM to properly generate the zip file.
149+
where you can also see how to configure your POM to properly generate the zip file.
150150

151151
The functional bean definition style works for custom runtimes as well, and is
152152
faster than the `@Bean` style. A custom runtime can start up much quicker even than a functional bean implementation

docs/modules/ROOT/pages/adapters/gcp-intro.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ curl http://localhost:8080/ -d "hello"
109109
----
110110

111111

112-
== Buikd & Deploy to GCP
112+
== Build & Deploy to GCP
113113

114114
Start by packaging your application.
115115

docs/modules/ROOT/pages/spring-cloud-function/deploying-a-packaged.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ the functions. It can optionally use a `maven:` prefix to locate the artifact vi
1919
for complete details). A Spring Boot application is bootstrapped from the jar file, using the `MANIFEST.MF` to locate a start class, so
2020
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
2121
registered in the main application's `FunctionCatalog`. The registered function can be applied by code in the main application, even though
22-
it was created in an isolated class loader (by deault).
22+
it was created in an isolated class loader (by default).
2323

2424
Here is the example of deploying a JAR which contains an 'uppercase' function and invoking it .
2525

docs/modules/ROOT/pages/spring-cloud-function/programming-model.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ Function uppercase = catalog.lookup(“uppercase”);
5555
----
5656

5757
Important to understand that given that `uppercase` is a bean, you can certainly get it form the `ApplicationContext` directly, but all you will get is just your bean as you declared it without any extra features provided by SCF. When you do lookup of a function via `FunctionCatalog`, the instance you will receive is wrapped (instrumented) with additional features (i.e., type conversion, composition etc.) described in this manual. Also, it is important to understand that a typical user does not use Spring Cloud Function directly. Instead a typical user implements Java `Function/Supplier/Consumer` with the idea of using it in different execution contexts without additional work. For example the same java function could be represented as _REST endpoint_ or _Streaming message handler_ or _AWS Lambda_ and more via Spring Cloud Function provided
58-
adapters as well as other frameworks using Spring Cloud Function as the core programming model (e.g., https://spring.io/projects/spring-cloud-stream[Spring Cloud Stream])
58+
adapters as well as other frameworks using Spring Cloud Function as the core programming model (e.g., https://spring.io/projects/spring-cloud-stream[Spring Cloud Stream]).
5959
So in summary Spring Cloud Function instruments java functions with additional features to be utilised in variety of execution contexts.
6060

6161

6262
[[function-definition]]
6363
=== Function definition
64-
While the previous example shows you how to lookup function in FunctionCatalog programmatically, in a typical integration case where Spring Cloud Function used as programming model by another framework (e.fg. Spring Cloud Stream), you declare which functions to use via `spring.cloud.function.definition` property. Knowing that it is important to understand some default behaviour when it comes to discovering functions in `FunctionCatalog`. For example, if you only have one Functional bean in your `ApplicationContext`, the `spring.cloud.function.definition` property typically will not be required, since a single function in `FunctionCatalog` can be looked up by an empty name or any name. For example, assuming that `uppercase` is the only function in your catalog, it can be looked up as `catalog.lookup(null)`, `catalog.lookup(“”)`, `catalog.lookup(“foo”)`
64+
While the previous example shows you how to lookup function in FunctionCatalog programmatically, in a typical integration case where Spring Cloud Function used as programming model by another framework (e.g., https://spring.io/projects/spring-cloud-stream[Spring Cloud Stream]), you declare which functions to use via `spring.cloud.function.definition` property. Knowing that it is important to understand some default behaviour when it comes to discovering functions in `FunctionCatalog`. For example, if you only have one Functional bean in your `ApplicationContext`, the `spring.cloud.function.definition` property typically will not be required, since a single function in `FunctionCatalog` can be looked up by an empty name or any name. For example, assuming that `uppercase` is the only function in your catalog, it can be looked up as `catalog.lookup(null)`, `catalog.lookup(“”)`, `catalog.lookup(“foo”)`.
6565
That said, for cases where you are using framework such as Spring Cloud Stream which uses `spring.cloud.function.definition` it is best practice and recommended to always use `spring.cloud.function.definition` property.
6666

6767
For example,
@@ -169,7 +169,7 @@ And of course you can't compose uncomposable such as Consumer and Function, Cons
169169
== Function Routing and Filtering
170170

171171
Since version 2.2 Spring Cloud Function provides routing feature allowing
172-
you to invoke a single function which acts as a router to an actual function you wish to invoke
172+
you to invoke a single function which acts as a router to an actual function you wish to invoke.
173173
This feature is very useful in certain FAAS environments where maintaining configurations
174174
for several functions could be cumbersome or exposing more than one function is not possible.
175175

docs/modules/ROOT/pages/spring-cloud-function/standalone-web-applications.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ See <<Testing Functional Applications>> to see the details and example on how to
4646
As you have noticed from the previous table, you can pass an argument to a function as path variable (i.e., `/\{function}/\{item}`).
4747
For example, `http://localhost:8080/uppercase/foo` will result in calling `uppercase` function with its input parameter being `foo`.
4848

49-
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`)
49+
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`).
5050
The framework will treat HTTP request parameters similar to the HTTP headers by storing them in the `Message` headers under the header key `http_request_param`
5151
with its value being a `Map` of request parameters, so in order to access them your function input signature should accept `Message` type (e.g., `Function<Message<String>, String>`). For convenience we provide `HeaderUtils.HTTP_REQUEST_PARAM` constant.
5252

@@ -82,7 +82,7 @@ of the actual URL, giving user ability to use it for evaluation and computation.
8282

8383
In situations where there are more than one function in catalog there may be a need to only export certain functions or function compositions. In that case you can use
8484
the same `spring.cloud.function.definition` property listing functions you intend to export delimited by `;`.
85-
Note that in this case nothing will be mapped to the root path and functions that are not listed (including compositions) are not going to be exported
85+
Note that in this case nothing will be mapped to the root path and functions that are not listed (including compositions) are not going to be exported.
8686

8787
For example,
8888

@@ -101,7 +101,7 @@ This will only export function composition `foo|bar` and function `baz` regardle
101101
== Http Headers propagation
102102

103103
By default most request `HttpHeaders` are copied into the response `HttpHeaders`. If you require to filter out certain headers you can provide the names of those headers using
104-
`spring.cloud.function.http.ignored-headers` delimited by comas. For example, `spring.cloud.function.http.ignored-headers=foo,bar`
104+
`spring.cloud.function.http.ignored-headers` delimited by comas. For example, `spring.cloud.function.http.ignored-headers=foo,bar`.
105105

106106
[[crud-rest-with-spring-cloud-function]]
107107
== CRUD REST with Spring Cloud Function

0 commit comments

Comments
 (0)