@@ -333,6 +333,8 @@ To improve the user experience and further assist the user in configuring a give
...
@@ -333,6 +333,8 @@ To improve the user experience and further assist the user in configuring a give
* Associates a provider, to attach a well defined semantic to a property, so that a tool can discover the list of potential values based on the project's context.
* Associates a provider, to attach a well defined semantic to a property, so that a tool can discover the list of potential values based on the project's context.
The `name` attribute of each hint refers to the `name` of a property.
The `name` attribute of each hint refers to the `name` of a property.
In the <<configuration-metadata-format,initial example shown earlier>>, we provide five values for the `spring.jpa.hibernate.ddl-auto` property: `none`, `validate`, `update`, `create`, and `create-drop`.
In the <<configuration-metadata-format,initial example shown earlier>>, we provide five values for the `spring.jpa.hibernate.ddl-auto` property: `none`, `validate`, `update`, `create`, and `create-drop`.
...
@@ -378,6 +380,7 @@ If your IDE supports it, this is by far the most effective approach to auto-comp
...
@@ -378,6 +380,7 @@ If your IDE supports it, this is by far the most effective approach to auto-comp
The **handle-as** provider lets you substitute the type of the property to a more high-level type.
The **handle-as** provider lets you substitute the type of the property to a more high-level type.
This typically happens when the property has a `java.lang.String` type, because you do not want your configuration classes to rely on classes that may not be on the classpath.
This typically happens when the property has a `java.lang.String` type, because you do not want your configuration classes to rely on classes that may not be on the classpath.
...
@@ -545,6 +553,7 @@ It is actually used internally as a `org.springframework.core.io.Resource` but c
...
@@ -545,6 +553,7 @@ It is actually used internally as a `org.springframework.core.io.Resource` but c
@@ -20,6 +20,7 @@ Please refer to the plugin's documentation to learn more:
...
@@ -20,6 +20,7 @@ Please refer to the plugin's documentation to learn more:
* {spring-boot-maven-plugin-api}[API]
* {spring-boot-maven-plugin-api}[API]
[[build-tool-plugins-gradle-plugin]]
[[build-tool-plugins-gradle-plugin]]
== Spring Boot Gradle Plugin
== Spring Boot Gradle Plugin
The Spring Boot Gradle Plugin provides Spring Boot support in Gradle, letting you package executable jar or war archives, run Spring Boot applications, and use the dependency management provided by `spring-boot-dependencies`.
The Spring Boot Gradle Plugin provides Spring Boot support in Gradle, letting you package executable jar or war archives, run Spring Boot applications, and use the dependency management provided by `spring-boot-dependencies`.
...
@@ -104,7 +105,6 @@ The following nested elements can be used with the task:
...
@@ -104,7 +105,6 @@ The following nested elements can be used with the task:
@@ -290,12 +290,14 @@ In this document, we describe to approach using AWS Elastic Beanstalk.
...
@@ -290,12 +290,14 @@ In this document, we describe to approach using AWS Elastic Beanstalk.
[[cloud-deployment-aws-beanstalk]]
==== AWS Elastic Beanstalk
==== AWS Elastic Beanstalk
As described in the official https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Java.html[Elastic Beanstalk Java guide], there are two main options to deploy a Java application.
As described in the official https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Java.html[Elastic Beanstalk Java guide], there are two main options to deploy a Java application.
You can either use the "`Tomcat Platform`" or the "`Java SE platform`".
You can either use the "`Tomcat Platform`" or the "`Java SE platform`".
[[cloud-deployment-aws-tomcat-platform]]
===== Using the Tomcat Platform
===== Using the Tomcat Platform
This option applies to Spring Boot projects that produce a war file.
This option applies to Spring Boot projects that produce a war file.
No special configuration is required.
No special configuration is required.
...
@@ -303,6 +305,7 @@ You need only follow the official guide.
...
@@ -303,6 +305,7 @@ You need only follow the official guide.
[[cloud-deployment-aws-java-se-platform]]
===== Using the Java SE Platform
===== Using the Java SE Platform
This option applies to Spring Boot projects that produce a jar file and run an embedded web container.
This option applies to Spring Boot projects that produce a jar file and run an embedded web container.
Elastic Beanstalk environments run an nginx instance on port 80 to proxy the actual application, running on port 5000.
Elastic Beanstalk environments run an nginx instance on port 80 to proxy the actual application, running on port 5000.
...
@@ -344,6 +347,7 @@ You can also create single instance environments by using the CLI and the follow
...
@@ -344,6 +347,7 @@ You can also create single instance environments by using the CLI and the follow
[[cloud-deployment-aws-summary]]
==== Summary
==== Summary
This is one of the easiest ways to get to AWS, but there are more things to cover, such as how to integrate Elastic Beanstalk into any CI / CD tool, use the Elastic Beanstalk Maven plugin instead of the CLI, and others.
This is one of the easiest ways to get to AWS, but there are more things to cover, such as how to integrate Elastic Beanstalk into any CI / CD tool, use the Elastic Beanstalk Maven plugin instead of the CLI, and others.
There is a https://exampledriven.wordpress.com/2017/01/09/spring-boot-aws-elastic-beanstalk-example/[blog post] covering these topics more in detail.
There is a https://exampledriven.wordpress.com/2017/01/09/spring-boot-aws-elastic-beanstalk-example/[blog post] covering these topics more in detail.
@@ -62,6 +62,7 @@ If you are getting started with Spring Boot or 'Spring' in general, start with <
...
@@ -62,6 +62,7 @@ If you are getting started with Spring Boot or 'Spring' in general, start with <
[[boot-documentation-workingwith]]
== Working with Spring Boot
== Working with Spring Boot
Ready to actually start using Spring Boot? <<using-spring-boot.adoc#using-boot, We have you covered>>:
Ready to actually start using Spring Boot? <<using-spring-boot.adoc#using-boot, We have you covered>>:
...
@@ -73,6 +74,7 @@ Ready to actually start using Spring Boot? <<using-spring-boot.adoc#using-boot,
...
@@ -73,6 +74,7 @@ Ready to actually start using Spring Boot? <<using-spring-boot.adoc#using-boot,
[[boot-documentation-learning]]
== Learning about Spring Boot Features
== Learning about Spring Boot Features
Need more details about Spring Boot's core features?
Need more details about Spring Boot's core features?
<<spring-boot-features.adoc#boot-features, The following content is for you>>:
<<spring-boot-features.adoc#boot-features, The following content is for you>>:
...
@@ -86,6 +88,7 @@ Need more details about Spring Boot's core features?
...
@@ -86,6 +88,7 @@ Need more details about Spring Boot's core features?
[[boot-documentation-production]]
== Moving to Production
== Moving to Production
When you are ready to push your Spring Boot application to production, we have <<production-ready-features.adoc#production-ready, some tricks>> that you might like:
When you are ready to push your Spring Boot application to production, we have <<production-ready-features.adoc#production-ready, some tricks>> that you might like:
...
@@ -95,6 +98,7 @@ When you are ready to push your Spring Boot application to production, we have <
...
@@ -95,6 +98,7 @@ When you are ready to push your Spring Boot application to production, we have <
[[boot-documentation-advanced]]
== Advanced Topics
== Advanced Topics
Finally, we have a few topics for more advanced users:
Finally, we have a few topics for more advanced users:
=== Configure the TcpClient used by a Reactor Netty-based WebClient
=== Configure the TcpClient used by a Reactor Netty-based WebClient
When Reactor Netty is on the classpath a Reactor Netty-based `WebClient` is auto-configured.
When Reactor Netty is on the classpath a Reactor Netty-based `WebClient` is auto-configured.
...
@@ -1344,6 +1348,7 @@ TIP: Note the use of `ReactorResourceFactory` for the connection provider and ev
...
@@ -1344,6 +1348,7 @@ TIP: Note the use of `ReactorResourceFactory` for the connection provider and ev
This ensures efficient sharing of resources for the server receiving requests and the client making requests.
This ensures efficient sharing of resources for the server receiving requests and the client making requests.
[[howto-logging]]
[[howto-logging]]
== Logging
== Logging
Spring Boot has no mandatory logging dependency, except for the Commons Logging API, which is typically provided by Spring Framework's `spring-jcl` module.
Spring Boot has no mandatory logging dependency, except for the Commons Logging API, which is typically provided by Spring Framework's `spring-jcl` module.
...
@@ -1927,6 +1932,7 @@ Spring Boot provides properties in the `spring.data.web` namespace for customizi
...
@@ -1927,6 +1932,7 @@ Spring Boot provides properties in the `spring.data.web` namespace for customizi
Note that if you are using Spring Data REST, you must use the properties in the `spring.data.rest` namespace instead.
Note that if you are using Spring Data REST, you must use the properties in the `spring.data.rest` namespace instead.
=== Expose Spring Data Repositories as REST Endpoint
=== Expose Spring Data Repositories as REST Endpoint
Spring Data REST can expose the `Repository` implementations as REST endpoints for you,
Spring Data REST can expose the `Repository` implementations as REST endpoints for you,
...
@@ -2351,6 +2357,7 @@ For more about Spring Security, see the {spring-security}[Spring Security projec
...
@@ -2351,6 +2357,7 @@ For more about Spring Security, see the {spring-security}[Spring Security projec
If you define a `@Configuration` with a `WebSecurityConfigurerAdapter` or a `SecurityFilterChain` bean in your application, it switches off the default webapp security settings in Spring Boot.
If you define a `@Configuration` with a `WebSecurityConfigurerAdapter` or a `SecurityFilterChain` bean in your application, it switches off the default webapp security settings in Spring Boot.
=== Change the UserDetailsService and Add User Accounts
=== Change the UserDetailsService and Add User Accounts
If you provide a `@Bean` of type `AuthenticationManager`, `AuthenticationProvider`, or `UserDetailsService`, the default `@Bean` for `InMemoryUserDetailsManager` is not created.
If you provide a `@Bean` of type `AuthenticationManager`, `AuthenticationProvider`, or `UserDetailsService`, the default `@Bean` for `InMemoryUserDetailsManager` is not created.
@@ -675,6 +675,7 @@ If no `HealthIndicator` returns a status that is known to the `StatusAggregator`
...
@@ -675,6 +675,7 @@ If no `HealthIndicator` returns a status that is known to the `StatusAggregator`
TIP: The `HealthContributorRegistry` can be used to register and unregister health indicators at runtime.
TIP: The `HealthContributorRegistry` can be used to register and unregister health indicators at runtime.
[[production-ready-health-indicators]]
[[production-ready-health-indicators]]
==== Auto-configured HealthIndicators
==== Auto-configured HealthIndicators
The following `HealthIndicators` are auto-configured by Spring Boot when appropriate.
The following `HealthIndicators` are auto-configured by Spring Boot when appropriate.
...
@@ -769,6 +770,7 @@ Additional `HealthIndicators` are available but not enabled by default:
...
@@ -769,6 +770,7 @@ Additional `HealthIndicators` are available but not enabled by default:
[[production-ready-health-indicators-writing]]
==== Writing Custom HealthIndicators
==== Writing Custom HealthIndicators
To provide custom health information, you can register Spring beans that implement the {spring-boot-actuator-module-code}/health/HealthIndicator.java[`HealthIndicator`] interface.
To provide custom health information, you can register Spring beans that implement the {spring-boot-actuator-module-code}/health/HealthIndicator.java[`HealthIndicator`] interface.
You need to provide an implementation of the `health()` method and return a `Health` response.
You need to provide an implementation of the `health()` method and return a `Health` response.
...
@@ -887,6 +889,7 @@ TIP: To handle the error automatically, consider extending from `AbstractReactiv
...
@@ -887,6 +889,7 @@ TIP: To handle the error automatically, consider extending from `AbstractReactiv
[[reactive-health-indicators-autoconfigured]]
==== Auto-configured ReactiveHealthIndicators
==== Auto-configured ReactiveHealthIndicators
The following `ReactiveHealthIndicators` are auto-configured by Spring Boot when appropriate:
The following `ReactiveHealthIndicators` are auto-configured by Spring Boot when appropriate:
...
@@ -917,6 +920,7 @@ TIP: If necessary, reactive indicators replace the regular ones.
...
@@ -917,6 +920,7 @@ TIP: If necessary, reactive indicators replace the regular ones.
Also, any `HealthIndicator` that is not handled explicitly is wrapped automatically.
Also, any `HealthIndicator` that is not handled explicitly is wrapped automatically.
[[production-ready-health-groups]]
[[production-ready-health-groups]]
==== Health Groups
==== Health Groups
It's sometimes useful to organize health indicators into groups that can be used for different purposes.
It's sometimes useful to organize health indicators into groups that can be used for different purposes.
...
@@ -2396,7 +2400,7 @@ NOTE: By default, metrics from all `MeterBinder` beans will be automatically bou
...
@@ -2396,7 +2400,7 @@ NOTE: By default, metrics from all `MeterBinder` beans will be automatically bou
[[production-ready-metrics-per-meter-properties]]
[[production-ready-metrics-customizing]]
=== Customizing individual metrics
=== Customizing individual metrics
If you need to apply customizations to specific `Meter` instances you can use the `io.micrometer.core.instrument.config.MeterFilter` interface.
If you need to apply customizations to specific `Meter` instances you can use the `io.micrometer.core.instrument.config.MeterFilter` interface.
...
@@ -2434,6 +2438,7 @@ As the order of common tags cannot be guaranteed using this approach, Graphite u
...
@@ -2434,6 +2438,7 @@ As the order of common tags cannot be guaranteed using this approach, Graphite u
[[production-ready-metrics-per-meter-properties]]
==== Per-meter properties
==== Per-meter properties
In addition to `MeterFilter` beans, it's also possible to apply a limited set of customization on a per-meter basis using properties.
In addition to `MeterFilter` beans, it's also possible to apply a limited set of customization on a per-meter basis using properties.
Per-meter customizations apply to any all meter IDs that start with the given name.
Per-meter customizations apply to any all meter IDs that start with the given name.
...
@@ -2616,6 +2621,7 @@ If your Cloud Foundry UAA or Cloud Controller services use self-signed certifica
...
@@ -2616,6 +2621,7 @@ If your Cloud Foundry UAA or Cloud Controller services use self-signed certifica
[[production-ready-custom-context-path]]
=== Custom context path
=== Custom context path
If the server's context-path has been configured to anything other than `/`, the Cloud Foundry endpoints will not be available at the root of the application.
If the server's context-path has been configured to anything other than `/`, the Cloud Foundry endpoints will not be available at the root of the application.
For example, if `server.servlet.context-path=/app`, Cloud Foundry endpoints will be available at `/app/cloudfoundryapplication/*`.
For example, if `server.servlet.context-path=/app`, Cloud Foundry endpoints will be available at `/app/cloudfoundryapplication/*`.