Polishing

Resolves #219
This commit is contained in:
Oleg Zhurakousky
2018-10-22 14:26:52 +02:00
parent ba34d4b81b
commit af717e445d
8 changed files with 40 additions and 12 deletions

View File

@@ -59,4 +59,4 @@ The input type for the function in the Azure sample is a Foo with a single prope
}
----
NOTE: The Azure sample app is written in the "non-functional" style (using `@Bean`). The functional style (with just `Function` or `ApplicationContextInitializer`) is is much faster on startup in Azure than the traditional `@Bean` style, so if you don't need `@Beans` (or `@EnableAutoConfiguration`) it's a good choice. Warm starts are not affected.
NOTE: The Azure sample app is written in the "non-functional" style (using `@Bean`). The functional style (with just `Function` or `ApplicationContextInitializer`) is much faster on startup in Azure than the traditional `@Bean` style, so if you don't need `@Beans` (or `@EnableAutoConfiguration`) it's a good choice. Warm starts are not affected.

View File

@@ -90,7 +90,7 @@ public class DemoApplication implements Function<String, String> {
}
```
It would also work to 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 type information is available at runtime through the class declaration.
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 type information is available at runtime through the class declaration.
The app runs in its own HTTP server if you add `spring-cloud-starter-function-webflux` (it won't work with the MVC starter at the moment because the functional form of the embedded Servlet container hasn't been implemented). The app also runs just fine in AWS Lambda or Azure Functions, and the improvements in startup time are dramatic.