Commit d42ad237 authored by Phillip Webb's avatar Phillip Webb

Merge branch '2.4.x'

Closes gh-26242
parents 1e0a3a94 94a70d68
......@@ -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.
[[configuration-metadata-providing-manual-hints-value-hint]]
=== Value Hint
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`.
......@@ -378,6 +380,7 @@ If your IDE supports it, this is by far the most effective approach to auto-comp
[[configuration-metadata-providing-manual-hints-value-providers]]
=== Value Providers
Providers are a powerful way to attach semantics to a property.
In this section, we define the official providers that you can use for your own hints.
......@@ -421,6 +424,7 @@ If no provider for a given property is supported, no special content assistance
[[configuration-metadata-providing-manual-hints-any]]
==== Any
The special **any** provider value permits any additional values to be provided.
Regular value validation based on the property type should be applied if this is supported.
......@@ -453,6 +457,9 @@ The following example offers `on` and `off` as auto-completion values for `syste
Note that, in the preceding example, any other value is also allowed.
[[configuration-metadata-providing-manual-hints-class-reference]]
==== Class Reference
The **class-reference** provider auto-completes classes available in the project.
This provider supports the following parameters:
......@@ -496,6 +503,7 @@ The following metadata snippet corresponds to the standard `server.servlet.jsp.c
[[configuration-metadata-providing-manual-hints-handle-as]]
==== Handle As
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.
......@@ -545,6 +553,7 @@ It is actually used internally as a `org.springframework.core.io.Resource` but c
[[configuration-metadata-providing-manual-hints-logger-name]]
==== Logger Name
The **logger-name** provider auto-completes valid logger names and <<spring-boot-features.adoc#boot-features-custom-log-groups,logger groups>>.
Typically, package and class names available in the current project can be auto-completed.
......@@ -631,6 +640,7 @@ As Spring Boot defines a few logger groups out-of-the-box, dedicated value hints
[[configuration-metadata-providing-manual-hints-spring-bean-reference]]
==== Spring Bean Reference
The **spring-bean-reference** provider auto-completes the beans that are defined in the configuration of the current project.
This provider supports the following parameters:
......@@ -670,6 +680,7 @@ If you provide that hint, you still need to transform the bean name into an actu
[[configuration-metadata-providing-manual-hints-spring-profile-name]]
==== Spring Profile Name
The **spring-profile-name** provider auto-completes the Spring profiles that are defined in the configuration of the current project.
......@@ -839,6 +850,7 @@ In order to document default values for properties in the class above, you could
NOTE: Only the `name` of the property is required to document additional metadata for existing properties.
[[configuration-metadata-annotation-processor-metadata-generation-nested]]
==== Nested Properties
The annotation processor automatically considers inner classes as nested properties.
......
......@@ -5,6 +5,8 @@ include::attributes.adoc[]
This appendix provides details of the dependencies that are managed by Spring Boot.
[[dependency-versions-coordinates]]
== Managed Dependency Coordinates
......@@ -13,6 +15,8 @@ When you declare a dependency on one of these artifacts without declaring a vers
include::dependency-versions.adoc[]
[[dependency-versions-properties]]
== Version Properties
......
......@@ -5,6 +5,8 @@ include::attributes.adoc[]
This appendix describes the `@…Test` auto-configuration annotations that Spring Boot provides to test slices of your application.
[[test-auto-configuration-slices]]
== Test Slices
......
......@@ -20,6 +20,7 @@ Please refer to the plugin's documentation to learn more:
* {spring-boot-maven-plugin-api}[API]
[[build-tool-plugins-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`.
......@@ -103,7 +104,6 @@ The following nested elements can be used with the task:
[[spring-boot-ant-exejar-examples]]
==== Examples
This section shows two examples of Ant tasks.
......
......@@ -290,12 +290,14 @@ In this document, we describe to approach using AWS Elastic Beanstalk.
[[cloud-deployment-aws-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.
You can either use the "`Tomcat Platform`" or the "`Java SE platform`".
[[cloud-deployment-aws-tomcat-platform]]
===== Using the Tomcat Platform
This option applies to Spring Boot projects that produce a war file.
No special configuration is required.
......@@ -303,6 +305,7 @@ You need only follow the official guide.
[[cloud-deployment-aws-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.
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
[[cloud-deployment-aws-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.
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 <
[[boot-documentation-workingwith]]
== Working with Spring Boot
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,
[[boot-documentation-learning]]
== Learning About Spring Boot Features
Need more details about Spring Boot's core features?
<<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?
[[boot-documentation-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:
......@@ -95,6 +98,7 @@ When you are ready to push your Spring Boot application to production, we have <
[[boot-documentation-advanced]]
== Advanced Topics
Finally, we have a few topics for more advanced users:
......
......@@ -597,7 +597,7 @@ You can enable HTTP/2 support in your Spring Boot application with the configpro
Both `h2` (HTTP/2 over TLS) and `h2c` (HTTP/2 over TCP) are supported.
To use `h2`, SSL must also be enabled.
When SSL is not enabled, `h2c` will be used.
The details of the `h2` support depend on the chosen web server and the application environment, since that protocol is not supported out-of-the-box by all JDK 8 releases.
The details of the `h2` support depend on the chosen web server and the application environment, since that protocol is not supported out-of-the-box by all JDK 8 releases.
......@@ -620,6 +620,7 @@ Starting Tomcat 9.0.x on JDK 8 with HTTP/2 and SSL enabled but without that nati
This error is not fatal, and the application still starts with HTTP/1.1 SSL support.
[[howto-configure-http2-jetty]]
==== HTTP/2 with Jetty
For HTTP/2 support, Jetty requires the additional `org.eclipse.jetty.http2:http2-server` dependency.
......@@ -1271,6 +1272,8 @@ The following example configures `HttpComponentsClientRequestFactory` with an `H
include::{include-springbootfeatures}/resttemplate/RestTemplateProxyCustomizer.java[tag=*]
----
[[howto-webclient-reactor-netty-customization]]
=== 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.
......@@ -1286,6 +1289,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.
[[howto-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.
......@@ -1868,6 +1872,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.
[[howto-use-exposing-spring-data-repositories-rest-endpoint]]
=== Expose Spring Data Repositories as REST Endpoint
Spring Data REST can expose the `Repository` implementations as REST endpoints for you,
......@@ -2309,6 +2314,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.
[[howto-change-the-user-details-service-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.
......
[legal]
[[legal]]
= Legal
Copyright &#169; 2012-2021
......
......@@ -693,6 +693,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.
[[production-ready-health-indicators]]
==== Auto-configured HealthIndicators
The following `HealthIndicators` are auto-configured by Spring Boot when appropriate.
......@@ -787,6 +788,7 @@ Additional `HealthIndicators` are available but not enabled by default:
[[production-ready-health-indicators-writing]]
==== 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.
You need to provide an implementation of the `health()` method and return a `Health` response.
......@@ -905,6 +907,7 @@ TIP: To handle the error automatically, consider extending from `AbstractReactiv
[[reactive-health-indicators-autoconfigured]]
==== Auto-configured ReactiveHealthIndicators
The following `ReactiveHealthIndicators` are auto-configured by Spring Boot when appropriate:
......@@ -935,6 +938,7 @@ TIP: If necessary, reactive indicators replace the regular ones.
Also, any `HealthIndicator` that is not handled explicitly is wrapped automatically.
[[production-ready-health-groups]]
==== Health Groups
It's sometimes useful to organize health indicators into groups that can be used for different purposes.
......@@ -2324,6 +2328,7 @@ There are convenience static functions in `RestTemplateExchangeTags` and `WebCli
[[production-ready-metrics-tomcat]]
==== Tomcat Metrics
Auto-configuration will enable the instrumentation of Tomcat only when an `MBeanRegistry` is enabled.
By default, the `MBeanRegistry` is disabled, but you can enable it by setting configprop:server.tomcat.mbeanregistry.enabled[] to `true`.
......@@ -2425,7 +2430,6 @@ Auto-configuration will enable the instrumentation of all available RabbitMQ con
[[production-ready-metrics-integration]]
==== Spring Integration Metrics
Spring Integration provides {spring-integration-docs}system-management.html#micrometer-integration[Micrometer support] automatically whenever a `MeterRegistry` bean is available.
......@@ -2615,7 +2619,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
If you need to apply customizations to specific `Meter` instances you can use the `io.micrometer.core.instrument.config.MeterFilter` interface.
......@@ -2653,6 +2657,7 @@ As the order of common tags cannot be guaranteed using this approach, Graphite u
[[production-ready-metrics-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.
Per-meter customizations apply to any all meter IDs that start with the given name.
......@@ -2835,6 +2840,7 @@ If your Cloud Foundry UAA or Cloud Controller services use self-signed certifica
[[production-ready-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.
For example, if `server.servlet.context-path=/app`, Cloud Foundry endpoints will be available at `/app/cloudfoundryapplication/*`.
......
......@@ -642,6 +642,7 @@ To disable the logging of the report, set the following property:
----
[[using-boot-devtools-restart-exclude]]
==== Excluding Resources
Certain resources do not necessarily need to trigger a restart when they are changed.
......@@ -870,6 +871,7 @@ The client component must be launched manually.
[[running-remote-client-application]]
==== Running the Remote Client Application
The remote client application is designed to be run from within your IDE.
You need to run `org.springframework.boot.devtools.RemoteSpringApplication` with the same classpath as the remote project that you connect to.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment