parent
cbd9cd654b
commit
2199a313be
|
@ -13,7 +13,7 @@ In a standalone application, the Actuator HTTP port defaults to the same as the
|
|||
To make the application listen on a different port, set the external property: configprop:management.server.port[].
|
||||
To listen on a completely different network address (such as when you have an internal network for management and an external one for user applications), you can also set `management.server.address` to a valid IP address to which the server is able to bind.
|
||||
|
||||
For more detail, see the xref:api:java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerProperties.html[`ManagementServerProperties`] source code and xref:reference:actuator/monitoring.adoc#actuator.monitoring.customizing-management-server-port[Customizing the Management Server Port] in the "`Production-Ready Features`" section.
|
||||
For more detail, see the javadoc:org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties[] source code and xref:reference:actuator/monitoring.adoc#actuator.monitoring.customizing-management-server-port[Customizing the Management Server Port] in the "`Production-Ready Features`" section.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ This section includes topics relating directly to Spring Boot applications.
|
|||
[[howto.application.failure-analyzer]]
|
||||
== Create Your Own FailureAnalyzer
|
||||
|
||||
xref:api:java/org/springframework/boot/diagnostics/FailureAnalyzer.html[`FailureAnalyzer`] is a great way to intercept an exception on startup and turn it into a human-readable message, wrapped in a xref:api:java/org/springframework/boot/diagnostics/FailureAnalysis.html[`FailureAnalysis`].
|
||||
javadoc:org.springframework.boot.diagnostics.FailureAnalyzer[] is a great way to intercept an exception on startup and turn it into a human-readable message, wrapped in a javadoc:org.springframework.boot.diagnostics.FailureAnalysis[].
|
||||
Spring Boot provides such an analyzer for application-context-related exceptions, JSR-303 validations, and more.
|
||||
You can also create your own.
|
||||
|
||||
|
@ -46,7 +46,7 @@ When reading the code, remember the following rules of thumb:
|
|||
Pay special attention to the `+@Conditional*+` annotations to find out what features they enable and when.
|
||||
Add `--debug` to the command line or the System property `-Ddebug` to get a log on the console of all the auto-configuration decisions that were made in your app.
|
||||
In a running application with actuator enabled, look at the `conditions` endpoint (`/actuator/conditions` or the JMX equivalent) for the same information.
|
||||
* Look for classes that are `@ConfigurationProperties` (such as xref:api:java/org/springframework/boot/autoconfigure/web/ServerProperties.html[`ServerProperties`]) and read from there the available external configuration options.
|
||||
* Look for classes that are `@ConfigurationProperties` (such as javadoc:org.springframework.boot.autoconfigure.web.ServerProperties[]) and read from there the available external configuration options.
|
||||
The `@ConfigurationProperties` annotation has a `name` attribute that acts as a prefix to external properties.
|
||||
Thus, `ServerProperties` has `prefix="server"` and its configuration properties are `server.port`, `server.address`, and others.
|
||||
In a running application with actuator enabled, look at the `configprops` endpoint.
|
||||
|
|
|
@ -34,7 +34,7 @@ If you do so and want two transaction managers, remember to mark the other one a
|
|||
|
||||
Spring Batch auto-configuration is enabled by adding `spring-boot-starter-batch` to your application's classpath.
|
||||
|
||||
If a single `Job` bean is found in the application context, it is executed on startup (see xref:api:java/org/springframework/boot/autoconfigure/batch/JobLauncherApplicationRunner.html[`JobLauncherApplicationRunner`] for details).
|
||||
If a single `Job` bean is found in the application context, it is executed on startup (see javadoc:org.springframework.boot.autoconfigure.batch.JobLauncherApplicationRunner[] for details).
|
||||
If multiple `Job` beans are found, the job that should be executed must be specified using configprop:spring.batch.job.name[].
|
||||
|
||||
To disable running a `Job` found in the application context, set the configprop:spring.batch.job.enabled[] to `false`.
|
||||
|
|
|
@ -126,16 +126,16 @@ spring:
|
|||
----
|
||||
|
||||
Rather than using `db/migration`, the preceding configuration sets the directory to use according to the type of the database (such as `db/migration/mysql` for MySQL).
|
||||
The list of supported databases is available in xref:api:java/org/springframework/boot/jdbc/DatabaseDriver.html[`DatabaseDriver`].
|
||||
The list of supported databases is available in javadoc:org.springframework.boot.jdbc.DatabaseDriver[].
|
||||
|
||||
Migrations can also be written in Java.
|
||||
Flyway will be auto-configured with any beans that implement `JavaMigration`.
|
||||
|
||||
xref:api:java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.html[`FlywayProperties`] provides most of Flyway's settings and a small set of additional properties that can be used to disable the migrations or switch off the location checking.
|
||||
javadoc:org.springframework.boot.autoconfigure.flyway.FlywayProperties[] provides most of Flyway's settings and a small set of additional properties that can be used to disable the migrations or switch off the location checking.
|
||||
If you need more control over the configuration, consider registering a `FlywayConfigurationCustomizer` bean.
|
||||
|
||||
Spring Boot calls `Flyway.migrate()` to perform the database migration.
|
||||
If you would like more control, provide a `@Bean` that implements xref:api:java/org/springframework/boot/autoconfigure/flyway/FlywayMigrationStrategy.html[`FlywayMigrationStrategy`].
|
||||
If you would like more control, provide a `@Bean` that implements javadoc:org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy[].
|
||||
|
||||
Flyway supports SQL and Java https://documentation.red-gate.com/fd/callback-concept-184127466.html[callbacks].
|
||||
To use SQL-based callbacks, place the callback scripts in the `classpath:db/migration` directory.
|
||||
|
@ -189,7 +189,7 @@ Alternatively, you can use Liquibase's native `DataSource` by setting `spring.li
|
|||
Setting either `spring.liquibase.url` or `spring.liquibase.user` is sufficient to cause Liquibase to use its own `DataSource`.
|
||||
If any of the three properties has not been set, the value of its equivalent `spring.datasource` property will be used.
|
||||
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.html[`LiquibaseProperties`] for details about available settings such as contexts, the default schema, and others.
|
||||
See javadoc:org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties[] for details about available settings such as contexts, the default schema, and others.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ include-code::MyBean[]
|
|||
|
||||
All Cloud Foundry properties are prefixed with `vcap`.
|
||||
You can use `vcap` properties to access application information (such as the public URL of the application) and service information (such as database credentials).
|
||||
See the xref:api:java/org/springframework/boot/cloud/CloudFoundryVcapEnvironmentPostProcessor.html[`CloudFoundryVcapEnvironmentPostProcessor`] API documentation for complete details.
|
||||
See the javadoc:org.springframework.boot.cloud.CloudFoundryVcapEnvironmentPostProcessor[] API documentation for complete details.
|
||||
|
||||
TIP: The https://github.com/pivotal-cf/java-cfenv/[Java CFEnv] project is a better fit for tasks such as configuring a DataSource.
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ Thanks to relaxed binding of `Environment` values, you can also use configprop:s
|
|||
|
||||
To switch off the HTTP endpoints completely but still create a `WebApplicationContext`, use `server.port=-1` (doing so is sometimes useful for testing).
|
||||
|
||||
For more details, see xref:reference:web/servlet.adoc#web.servlet.embedded-container.customizing[Customizing Embedded Servlet Containers] in the '`Spring Boot Features`' section, or the xref:api:java/org/springframework/boot/autoconfigure/web/ServerProperties.html[`ServerProperties`] class.
|
||||
For more details, see xref:reference:web/servlet.adoc#web.servlet.embedded-container.customizing[Customizing Embedded Servlet Containers] in the '`Spring Boot Features`' section, or the javadoc:org.springframework.boot.autoconfigure.web.ServerProperties[] class.
|
||||
|
||||
|
||||
|
||||
|
@ -148,7 +148,7 @@ You can configure this behavior by setting the configprop:server.compression.mim
|
|||
== Configure SSL
|
||||
|
||||
SSL can be configured declaratively by setting the various `+server.ssl.*+` properties, typically in `application.properties` or `application.yaml`.
|
||||
See xref:api:java/org/springframework/boot/web/server/Ssl.html[`Ssl`] for details of all of the supported properties.
|
||||
See javadoc:org.springframework.boot.web.server.Ssl[] for details of all of the supported properties.
|
||||
|
||||
The following example shows setting SSL properties using a Java KeyStore file:
|
||||
|
||||
|
@ -300,7 +300,7 @@ The `server.{asterisk}` namespace is quite useful here, and it includes namespac
|
|||
See the list of xref:appendix:application-properties/index.adoc[].
|
||||
|
||||
The previous sections covered already many common use cases, such as compression, SSL or HTTP/2.
|
||||
However, if a configuration key does not exist for your use case, you should then look at xref:api:java/org/springframework/boot/web/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`].
|
||||
However, if a configuration key does not exist for your use case, you should then look at javadoc:org.springframework.boot.web.server.WebServerFactoryCustomizer[].
|
||||
You can declare such a component and get access to the server factory relevant to your choice: you should select the variant for the chosen Server (Tomcat, Jetty, Reactor Netty, Undertow) and the chosen web stack (servlet or reactive).
|
||||
|
||||
The example below is for Tomcat with the `spring-boot-starter-web` (servlet stack):
|
||||
|
@ -465,7 +465,7 @@ You can use them in your application by setting configprop:server.forward-header
|
|||
TIP: If you are using Tomcat and terminating SSL at the proxy, configprop:server.tomcat.redirect-context-root[] should be set to `false`.
|
||||
This allows the `X-Forwarded-Proto` header to be honored before any redirects are performed.
|
||||
|
||||
NOTE: If your application runs xref:api:java/org/springframework/boot/cloud/CloudPlatform.html#enum-constant-summary[in a supported Cloud Platform], the configprop:server.forward-headers-strategy[] property defaults to `NATIVE`.
|
||||
NOTE: If your application runs javadoc:org.springframework.boot.cloud.CloudPlatform#enum-constant-summary[in a supported Cloud Platform], the configprop:server.forward-headers-strategy[] property defaults to `NATIVE`.
|
||||
In all other instances, it defaults to `NONE`.
|
||||
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@ management:
|
|||
allowed-methods: "GET,POST"
|
||||
----
|
||||
|
||||
TIP: See xref:api:java/org/springframework/boot/actuate/autoconfigure/endpoint/web/CorsEndpointProperties.html[`CorsEndpointProperties`] for a complete list of options.
|
||||
TIP: See javadoc:org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties[] for a complete list of options.
|
||||
|
||||
|
||||
|
||||
|
@ -565,7 +565,7 @@ You can configure the roles by using the configprop:management.endpoint.health.r
|
|||
|
||||
NOTE: If you have secured your application and wish to use `always`, your security configuration must permit access to the health endpoint for both authenticated and unauthenticated users.
|
||||
|
||||
Health information is collected from the content of a xref:api:java/org/springframework/boot/actuate/health/HealthContributorRegistry.html[`HealthContributorRegistry`] (by default, all xref:api:java/org/springframework/boot/actuate/health/HealthContributor.html[`HealthContributor`] instances defined in your `ApplicationContext`).
|
||||
Health information is collected from the content of a javadoc:org.springframework.boot.actuate.health.HealthContributorRegistry[] (by default, all javadoc:org.springframework.boot.actuate.health.HealthContributor[] instances defined in your `ApplicationContext`).
|
||||
Spring Boot includes a number of auto-configured `HealthContributors`, and you can also write your own.
|
||||
|
||||
A `HealthContributor` can be either a `HealthIndicator` or a `CompositeHealthContributor`.
|
||||
|
@ -593,63 +593,63 @@ with the `key` listed in the following table:
|
|||
| Key | Name | Description
|
||||
|
||||
| `cassandra`
|
||||
| xref:api:java/org/springframework/boot/actuate/cassandra/CassandraDriverHealthIndicator.html[`CassandraDriverHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.cassandra.CassandraDriverHealthIndicator[]
|
||||
| Checks that a Cassandra database is up.
|
||||
|
||||
| `couchbase`
|
||||
| xref:api:java/org/springframework/boot/actuate/couchbase/CouchbaseHealthIndicator.html[`CouchbaseHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.couchbase.CouchbaseHealthIndicator[]
|
||||
| Checks that a Couchbase cluster is up.
|
||||
|
||||
| `db`
|
||||
| xref:api:java/org/springframework/boot/actuate/jdbc/DataSourceHealthIndicator.html[`DataSourceHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator[]
|
||||
| Checks that a connection to `DataSource` can be obtained.
|
||||
|
||||
| `diskspace`
|
||||
| xref:api:java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicator.html[`DiskSpaceHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.system.DiskSpaceHealthIndicator[]
|
||||
| Checks for low disk space.
|
||||
|
||||
| `elasticsearch`
|
||||
| xref:api:java/org/springframework/boot/actuate/elasticsearch/ElasticsearchRestClientHealthIndicator.html[`ElasticsearchRestClientHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.elasticsearch.ElasticsearchRestClientHealthIndicator[]
|
||||
| Checks that an Elasticsearch cluster is up.
|
||||
|
||||
| `hazelcast`
|
||||
| xref:api:java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicator.html[`HazelcastHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.hazelcast.HazelcastHealthIndicator[]
|
||||
| Checks that a Hazelcast server is up.
|
||||
|
||||
| `influxdb`
|
||||
| xref:api:java/org/springframework/boot/actuate/influx/InfluxDbHealthIndicator.html[`InfluxDbHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.influx.InfluxDbHealthIndicator[]
|
||||
| Checks that an InfluxDB server is up.
|
||||
|
||||
| `jms`
|
||||
| xref:api:java/org/springframework/boot/actuate/jms/JmsHealthIndicator.html[`JmsHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.jms.JmsHealthIndicator[]
|
||||
| Checks that a JMS broker is up.
|
||||
|
||||
| `ldap`
|
||||
| xref:api:java/org/springframework/boot/actuate/ldap/LdapHealthIndicator.html[`LdapHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.ldap.LdapHealthIndicator[]
|
||||
| Checks that an LDAP server is up.
|
||||
|
||||
| `mail`
|
||||
| xref:api:java/org/springframework/boot/actuate/mail/MailHealthIndicator.html[`MailHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.mail.MailHealthIndicator[]
|
||||
| Checks that a mail server is up.
|
||||
|
||||
| `mongo`
|
||||
| xref:api:java/org/springframework/boot/actuate/data/mongo/MongoHealthIndicator.html[`MongoHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.data.mongo.MongoHealthIndicator[]
|
||||
| Checks that a Mongo database is up.
|
||||
|
||||
| `neo4j`
|
||||
| xref:api:java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicator.html[`Neo4jHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.neo4j.Neo4jHealthIndicator[]
|
||||
| Checks that a Neo4j database is up.
|
||||
|
||||
| `ping`
|
||||
| xref:api:java/org/springframework/boot/actuate/health/PingHealthIndicator.html[`PingHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.health.PingHealthIndicator[]
|
||||
| Always responds with `UP`.
|
||||
|
||||
| `rabbit`
|
||||
| xref:api:java/org/springframework/boot/actuate/amqp/RabbitHealthIndicator.html[`RabbitHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.amqp.RabbitHealthIndicator[]
|
||||
| Checks that a Rabbit server is up.
|
||||
|
||||
| `redis`
|
||||
| xref:api:java/org/springframework/boot/actuate/data/redis/RedisHealthIndicator.html[`RedisHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.data.redis.RedisHealthIndicator[]
|
||||
| Checks that a Redis server is up.
|
||||
|===
|
||||
|
||||
|
@ -662,11 +662,11 @@ Additional `HealthIndicators` are available but are not enabled by default:
|
|||
| Key | Name | Description
|
||||
|
||||
| `livenessstate`
|
||||
| xref:api:java/org/springframework/boot/actuate/availability/LivenessStateHealthIndicator.html[`LivenessStateHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.availability.LivenessStateHealthIndicator[]
|
||||
| Exposes the "`Liveness`" application availability state.
|
||||
|
||||
| `readinessstate`
|
||||
| xref:api:java/org/springframework/boot/actuate/availability/ReadinessStateHealthIndicator.html[`ReadinessStateHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.availability.ReadinessStateHealthIndicator[]
|
||||
| Exposes the "`Readiness`" application availability state.
|
||||
|===
|
||||
|
||||
|
@ -675,7 +675,7 @@ Additional `HealthIndicators` are available but are not enabled by default:
|
|||
[[actuator.endpoints.health.writing-custom-health-indicators]]
|
||||
=== Writing Custom HealthIndicators
|
||||
|
||||
To provide custom health information, you can register Spring beans that implement the xref:api:java/org/springframework/boot/actuate/health/HealthIndicator.html[`HealthIndicator`] interface.
|
||||
To provide custom health information, you can register Spring beans that implement the javadoc:org.springframework.boot.actuate.health.HealthIndicator[] interface.
|
||||
You need to provide an implementation of the `health()` method and return a `Health` response.
|
||||
The `Health` response should include a status and can optionally include additional details to be displayed.
|
||||
The following code shows a sample `HealthIndicator` implementation:
|
||||
|
@ -689,8 +689,8 @@ TIP: Health indicators are usually called over HTTP and need to respond before a
|
|||
Spring Boot will log a warning message for any health indicator that takes longer than 10 seconds to respond.
|
||||
If you want to configure this threshold, you can use the configprop:management.endpoint.health.logging.slow-indicator-threshold[] property.
|
||||
|
||||
In addition to Spring Boot's predefined xref:api:java/org/springframework/boot/actuate/health/Status.html[`Status`] types, `Health` can return a custom `Status` that represents a new system state.
|
||||
In such cases, you also need to provide a custom implementation of the xref:api:java/org/springframework/boot/actuate/health/StatusAggregator.html[`StatusAggregator`] interface, or you must configure the default implementation by using the configprop:management.endpoint.health.status.order[] configuration property.
|
||||
In addition to Spring Boot's predefined javadoc:org.springframework.boot.actuate.health.Status[] types, `Health` can return a custom `Status` that represents a new system state.
|
||||
In such cases, you also need to provide a custom implementation of the javadoc:org.springframework.boot.actuate.health.StatusAggregator[] interface, or you must configure the default implementation by using the configprop:management.endpoint.health.status.order[] configuration property.
|
||||
|
||||
For example, assume a new `Status` with a code of `FATAL` is being used in one of your `HealthIndicator` implementations.
|
||||
To configure the severity order, add the following property to your application properties:
|
||||
|
@ -751,13 +751,13 @@ The following table shows the default status mappings for the built-in statuses:
|
|||
=== Reactive Health Indicators
|
||||
|
||||
For reactive applications, such as those that use Spring WebFlux, `ReactiveHealthContributor` provides a non-blocking contract for getting application health.
|
||||
Similar to a traditional `HealthContributor`, health information is collected from the content of a xref:api:java/org/springframework/boot/actuate/health/ReactiveHealthContributorRegistry.html[`ReactiveHealthContributorRegistry`] (by default, all xref:api:java/org/springframework/boot/actuate/health/HealthContributor.html[`HealthContributor`] and xref:api:java/org/springframework/boot/actuate/health/ReactiveHealthContributor.html[`ReactiveHealthContributor`] instances defined in your `ApplicationContext`).
|
||||
Similar to a traditional `HealthContributor`, health information is collected from the content of a javadoc:org.springframework.boot.actuate.health.ReactiveHealthContributorRegistry[] (by default, all javadoc:org.springframework.boot.actuate.health.HealthContributor[] and javadoc:org.springframework.boot.actuate.health.ReactiveHealthContributor[] instances defined in your `ApplicationContext`).
|
||||
Regular `HealthContributors` that do not check against a reactive API are executed on the elastic scheduler.
|
||||
|
||||
TIP: In a reactive application, you should use the `ReactiveHealthContributorRegistry` to register and unregister health indicators at runtime.
|
||||
If you need to register a regular `HealthContributor`, you should wrap it with `ReactiveHealthContributor#adapt`.
|
||||
|
||||
To provide custom health information from a reactive API, you can register Spring beans that implement the xref:api:java/org/springframework/boot/actuate/health/ReactiveHealthIndicator.html[`ReactiveHealthIndicator`] interface.
|
||||
To provide custom health information from a reactive API, you can register Spring beans that implement the javadoc:org.springframework.boot.actuate.health.ReactiveHealthIndicator[] interface.
|
||||
The following code shows a sample `ReactiveHealthIndicator` implementation:
|
||||
|
||||
include-code::MyReactiveHealthIndicator[]
|
||||
|
@ -776,27 +776,27 @@ When appropriate, Spring Boot auto-configures the following `ReactiveHealthIndic
|
|||
| Key | Name | Description
|
||||
|
||||
| `cassandra`
|
||||
| xref:api:java/org/springframework/boot/actuate/cassandra/CassandraDriverReactiveHealthIndicator.html[`CassandraDriverReactiveHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.cassandra.CassandraDriverReactiveHealthIndicator[]
|
||||
| Checks that a Cassandra database is up.
|
||||
|
||||
| `couchbase`
|
||||
| xref:api:java/org/springframework/boot/actuate/couchbase/CouchbaseReactiveHealthIndicator.html[`CouchbaseReactiveHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.couchbase.CouchbaseReactiveHealthIndicator[]
|
||||
| Checks that a Couchbase cluster is up.
|
||||
|
||||
| `elasticsearch`
|
||||
| xref:api:java/org/springframework/boot/actuate/data/elasticsearch/ElasticsearchReactiveHealthIndicator.html[`ElasticsearchReactiveHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.data.elasticsearch.ElasticsearchReactiveHealthIndicator[]
|
||||
| Checks that an Elasticsearch cluster is up.
|
||||
|
||||
| `mongo`
|
||||
| xref:api:java/org/springframework/boot/actuate/data/mongo/MongoReactiveHealthIndicator.html[`MongoReactiveHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.data.mongo.MongoReactiveHealthIndicator[]
|
||||
| Checks that a Mongo database is up.
|
||||
|
||||
| `neo4j`
|
||||
| xref:api:java/org/springframework/boot/actuate/neo4j/Neo4jReactiveHealthIndicator.html[`Neo4jReactiveHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.neo4j.Neo4jReactiveHealthIndicator[]
|
||||
| Checks that a Neo4j database is up.
|
||||
|
||||
| `redis`
|
||||
| xref:api:java/org/springframework/boot/actuate/data/redis/RedisReactiveHealthIndicator.html[`RedisReactiveHealthIndicator`]
|
||||
| javadoc:org.springframework.boot.actuate.data.redis.RedisReactiveHealthIndicator[]
|
||||
| Checks that a Redis server is up.
|
||||
|===
|
||||
|
||||
|
@ -1069,7 +1069,7 @@ TIP: See xref:how-to:deployment/cloud.adoc#howto.deployment.cloud.kubernetes.con
|
|||
[[actuator.endpoints.info]]
|
||||
== Application Information
|
||||
|
||||
Application information exposes various information collected from all xref:api:java/org/springframework/boot/actuate/info/InfoContributor.html[`InfoContributor`] beans defined in your `ApplicationContext`.
|
||||
Application information exposes various information collected from all javadoc:org.springframework.boot.actuate.info.InfoContributor[] beans defined in your `ApplicationContext`.
|
||||
Spring Boot includes a number of auto-configured `InfoContributor` beans, and you can write your own.
|
||||
|
||||
|
||||
|
@ -1084,32 +1084,32 @@ When appropriate, Spring auto-configures the following `InfoContributor` beans:
|
|||
| ID | Name | Description | Prerequisites
|
||||
|
||||
| `build`
|
||||
| xref:api:java/org/springframework/boot/actuate/info/BuildInfoContributor.html[`BuildInfoContributor`]
|
||||
| javadoc:org.springframework.boot.actuate.info.BuildInfoContributor[]
|
||||
| Exposes build information.
|
||||
| A `META-INF/build-info.properties` resource.
|
||||
|
||||
| `env`
|
||||
| xref:api:java/org/springframework/boot/actuate/info/EnvironmentInfoContributor.html[`EnvironmentInfoContributor`]
|
||||
| javadoc:org.springframework.boot.actuate.info.EnvironmentInfoContributor[]
|
||||
| Exposes any property from the `Environment` whose name starts with `info.`.
|
||||
| None.
|
||||
|
||||
| `git`
|
||||
| xref:api:java/org/springframework/boot/actuate/info/GitInfoContributor.html[`GitInfoContributor`]
|
||||
| javadoc:org.springframework.boot.actuate.info.GitInfoContributor[]
|
||||
| Exposes git information.
|
||||
| A `git.properties` resource.
|
||||
|
||||
| `java`
|
||||
| xref:api:java/org/springframework/boot/actuate/info/JavaInfoContributor.html[`JavaInfoContributor`]
|
||||
| javadoc:org.springframework.boot.actuate.info.JavaInfoContributor[]
|
||||
| Exposes Java runtime information.
|
||||
| None.
|
||||
|
||||
| `os`
|
||||
| xref:api:java/org/springframework/boot/actuate/info/OsInfoContributor.html[`OsInfoContributor`]
|
||||
| javadoc:org.springframework.boot.actuate.info.OsInfoContributor[]
|
||||
| Exposes Operating System information.
|
||||
| None.
|
||||
|
||||
| `process`
|
||||
| xref:api:java/org/springframework/boot/actuate/info/ProcessInfoContributor.html[`ProcessInfoContributor`]
|
||||
| javadoc:org.springframework.boot.actuate.info.ProcessInfoContributor[]
|
||||
| Exposes process information.
|
||||
| None.
|
||||
|
||||
|
@ -1210,28 +1210,28 @@ See xref:how-to:build.adoc#howto.build.generate-info[] for more details.
|
|||
[[actuator.endpoints.info.java-information]]
|
||||
=== Java Information
|
||||
|
||||
The `info` endpoint publishes information about your Java runtime environment, see xref:api:java/org/springframework/boot/info/JavaInfo.html[`JavaInfo`] for more details.
|
||||
The `info` endpoint publishes information about your Java runtime environment, see javadoc:org.springframework.boot.info.JavaInfo[] for more details.
|
||||
|
||||
|
||||
|
||||
[[actuator.endpoints.info.os-information]]
|
||||
=== OS Information
|
||||
|
||||
The `info` endpoint publishes information about your Operating System, see xref:api:java/org/springframework/boot/info/OsInfo.html[`OsInfo`] for more details.
|
||||
The `info` endpoint publishes information about your Operating System, see javadoc:org.springframework.boot.info.OsInfo[] for more details.
|
||||
|
||||
|
||||
|
||||
[[actuator.endpoints.info.process-information]]
|
||||
=== Process Information
|
||||
|
||||
The `info` endpoint publishes information about your process, see xref:api:java/org/springframework/boot/info/ProcessInfo.html[`ProcessInfo`] for more details.
|
||||
The `info` endpoint publishes information about your process, see javadoc:org.springframework.boot.info.ProcessInfo[] for more details.
|
||||
|
||||
|
||||
|
||||
[[actuator.endpoints.info.writing-custom-info-contributors]]
|
||||
=== Writing Custom InfoContributors
|
||||
|
||||
To provide custom application information, you can register Spring beans that implement the xref:api:java/org/springframework/boot/actuate/info/InfoContributor.html[`InfoContributor`] interface.
|
||||
To provide custom application information, you can register Spring beans that implement the javadoc:org.springframework.boot.actuate.info.InfoContributor[] interface.
|
||||
|
||||
The following example contributes an `example` entry with a single value:
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ If you need to specify a specific class, you can use the configprop:spring.datas
|
|||
NOTE: For a pooling `DataSource` to be created, we need to be able to verify that a valid `Driver` class is available, so we check for that before doing anything.
|
||||
In other words, if you set `spring.datasource.driver-class-name=com.mysql.jdbc.Driver`, then that class has to be loadable.
|
||||
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.html[`DataSourceProperties`] API documentation for more of the supported options.
|
||||
See javadoc:org.springframework.boot.autoconfigure.jdbc.DataSourceProperties[] API documentation for more of the supported options.
|
||||
These are the standard options that work regardless of xref:data/sql.adoc#data.sql.datasource.connection-pool[the actual implementation].
|
||||
It is also possible to fine-tune implementation-specific settings by using their respective prefix (`+spring.datasource.hikari.*+`, `+spring.datasource.tomcat.*+`, `+spring.datasource.dbcp2.*+`, and `+spring.datasource.oracleucp.*+`).
|
||||
See the documentation of the connection pool implementation you are using for more details.
|
||||
|
|
|
@ -41,7 +41,7 @@ Make sure that they are defined in a specific package space and that they are ne
|
|||
Furthermore, auto-configuration classes should not enable component scanning to find additional components.
|
||||
Specific `@Import` annotations should be used instead.
|
||||
|
||||
If your configuration needs to be applied in a specific order, you can use the `before`, `beforeName`, `after` and `afterName` attributes on the xref:api:java/org/springframework/boot/autoconfigure/AutoConfiguration.html[`@AutoConfiguration`] annotation or the dedicated xref:api:java/org/springframework/boot/autoconfigure/AutoConfigureBefore.html[`@AutoConfigureBefore`] and xref:api:java/org/springframework/boot/autoconfigure/AutoConfigureAfter.html[`@AutoConfigureAfter`] annotations.
|
||||
If your configuration needs to be applied in a specific order, you can use the `before`, `beforeName`, `after` and `afterName` attributes on the javadoc:org.springframework.boot.autoconfigure.AutoConfiguration[format=annotation] annotation or the dedicated javadoc:org.springframework.boot.autoconfigure.AutoConfigureBefore[format=annotation] and javadoc:org.springframework.boot.autoconfigure.AutoConfigureAfter[format=annotation] annotations.
|
||||
For example, if you provide web-specific configuration, your class may need to be applied after `WebMvcAutoConfiguration`.
|
||||
|
||||
If you want to order certain auto-configurations that should not have any direct knowledge of each other, you can also use `@AutoConfigureOrder`.
|
||||
|
|
|
@ -24,7 +24,7 @@ Sources are considered in the following order:
|
|||
. Properties from `SPRING_APPLICATION_JSON` (inline JSON embedded in an environment variable or system property).
|
||||
. Command line arguments.
|
||||
. `properties` attribute on your tests.
|
||||
Available on xref:api:java/org/springframework/boot/test/context/SpringBootTest.html[`@SpringBootTest`] and the xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[test annotations for testing a particular slice of your application].
|
||||
Available on javadoc:org.springframework.boot.test.context.SpringBootTest[format=annotation] and the xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[test annotations for testing a particular slice of your application].
|
||||
. {url-spring-framework-javadoc}/org/springframework/test/context/DynamicPropertySource.html[`@DynamicPropertySource`] annotations in your tests.
|
||||
. {url-spring-framework-javadoc}/org/springframework/test/context/TestPropertySource.html[`@TestPropertySource`] annotations on your tests.
|
||||
. xref:using/devtools.adoc#using.devtools.globalsettings[Devtools global settings properties] in the `$HOME/.config/spring-boot` directory when devtools is active.
|
||||
|
|
|
@ -20,4 +20,4 @@ spring:
|
|||
|
||||
TIP: `spring.messages.basename` supports comma-separated list of locations, either a package qualifier or a resource resolved from the classpath root.
|
||||
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.html[`MessageSourceProperties`] for more supported options.
|
||||
See javadoc:org.springframework.boot.autoconfigure.context.MessageSourceProperties[] for more supported options.
|
||||
|
|
|
@ -34,8 +34,8 @@ include-code::MyJsonComponent[]
|
|||
All `@JsonComponent` beans in the `ApplicationContext` are automatically registered with Jackson.
|
||||
Because `@JsonComponent` is meta-annotated with `@Component`, the usual component-scanning rules apply.
|
||||
|
||||
Spring Boot also provides xref:api:java/org/springframework/boot/jackson/JsonObjectSerializer.html[`JsonObjectSerializer`] and xref:api:java/org/springframework/boot/jackson/JsonObjectDeserializer.html[`JsonObjectDeserializer`] base classes that provide useful alternatives to the standard Jackson versions when serializing objects.
|
||||
See xref:api:java/org/springframework/boot/jackson/JsonObjectSerializer.html[`JsonObjectSerializer`] and xref:api:java/org/springframework/boot/jackson/JsonObjectDeserializer.html[`JsonObjectDeserializer`] in the API documentation for details.
|
||||
Spring Boot also provides javadoc:org.springframework.boot.jackson.JsonObjectSerializer[] and javadoc:org.springframework.boot.jackson.JsonObjectDeserializer[] base classes that provide useful alternatives to the standard Jackson versions when serializing objects.
|
||||
See javadoc:org.springframework.boot.jackson.JsonObjectSerializer[] and javadoc:org.springframework.boot.jackson.JsonObjectDeserializer[] in the API documentation for details.
|
||||
|
||||
The example above can be rewritten to use `JsonObjectSerializer`/`JsonObjectDeserializer` as follows:
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ Doing so enables trace logging for a selection of core loggers (embedded contain
|
|||
=== Color-coded Output
|
||||
|
||||
If your terminal supports ANSI, color output is used to aid readability.
|
||||
You can set `spring.output.ansi.enabled` to a xref:api:java/org/springframework/boot/ansi/AnsiOutput.Enabled.html[supported value] to override the auto-detection.
|
||||
You can set `spring.output.ansi.enabled` to a javadoc:org.springframework.boot.ansi.AnsiOutput$Enabled[supported value] to override the auto-detection.
|
||||
|
||||
Color coding is configured by using the `%clr` conversion word.
|
||||
In its simplest form, the converter colors the output according to the log level, as shown in the following example:
|
||||
|
|
|
@ -64,7 +64,7 @@ This means that you can specify active profiles in `application.properties` and
|
|||
Sometimes, it is useful to have properties that *add* to the active profiles rather than replace them.
|
||||
The `spring.profiles.include` property can be used to add active profiles on top of those activated by the configprop:spring.profiles.active[] property.
|
||||
The `SpringApplication` entry point also has a Java API for setting additional profiles.
|
||||
See the `setAdditionalProfiles()` method in xref:api:java/org/springframework/boot/SpringApplication.html[`SpringApplication`].
|
||||
See the `setAdditionalProfiles()` method in javadoc:org.springframework.boot.SpringApplication[].
|
||||
|
||||
For example, when an application with the following properties is run, the common and local profiles will be activated even when it runs using the `--spring.profiles.active` switch:
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ Inside your `banner.txt` file, you can use any key available in the `Environment
|
|||
|
||||
| `${Ansi.NAME}` (or `${AnsiColor.NAME}`, `${AnsiBackground.NAME}`, `${AnsiStyle.NAME}`)
|
||||
| Where `NAME` is the name of an ANSI escape code.
|
||||
See xref:api:java/org/springframework/boot/ansi/AnsiPropertySource.html[`AnsiPropertySource`] for details.
|
||||
See javadoc:org.springframework.boot.ansi.AnsiPropertySource[] for details.
|
||||
|
||||
| `${application.title}`
|
||||
| The title of your application, as declared in `MANIFEST.MF`.
|
||||
|
@ -157,7 +157,7 @@ In most cases, these are references to `@Configuration` classes, but they could
|
|||
It is also possible to configure the `SpringApplication` by using an `application.properties` file.
|
||||
See xref:features/external-config.adoc[] for details.
|
||||
|
||||
For a complete list of the configuration options, see the xref:api:java/org/springframework/boot/SpringApplication.html[`SpringApplication`] API documentation.
|
||||
For a complete list of the configuration options, see the javadoc:org.springframework.boot.SpringApplication[] API documentation.
|
||||
|
||||
|
||||
|
||||
|
@ -172,7 +172,7 @@ include-code::MyApplication[tag=*]
|
|||
|
||||
NOTE: There are some restrictions when creating an `ApplicationContext` hierarchy.
|
||||
For example, Web components *must* be contained within the child context, and the same `Environment` is used for both parent and child contexts.
|
||||
See the xref:api:java/org/springframework/boot/builder/SpringApplicationBuilder.html[`SpringApplicationBuilder`] API documentation for full details.
|
||||
See the javadoc:org.springframework.boot.builder.SpringApplicationBuilder[] API documentation for full details.
|
||||
|
||||
|
||||
|
||||
|
@ -360,7 +360,7 @@ To control the order in which the generators are called, additionally implement
|
|||
== Admin Features
|
||||
|
||||
It is possible to enable admin-related features for the application by specifying the configprop:spring.application.admin.enabled[] property.
|
||||
This exposes the xref:api:java/org/springframework/boot/admin/SpringApplicationAdminMXBean.html[`SpringApplicationAdminMXBean`] on the platform `MBeanServer`.
|
||||
This exposes the javadoc:org.springframework.boot.admin.SpringApplicationAdminMXBean[] on the platform `MBeanServer`.
|
||||
You could use this feature to administer your Spring Boot application remotely.
|
||||
This feature could also be useful for any service wrapper implementation.
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ When used to secure a client-side connection, a `truststore` is typically config
|
|||
password: "secret"
|
||||
----
|
||||
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/ssl/JksSslBundleProperties.html[`JksSslBundleProperties`] for the full set of supported properties.
|
||||
See javadoc:org.springframework.boot.autoconfigure.ssl.JksSslBundleProperties[] for the full set of supported properties.
|
||||
|
||||
|
||||
|
||||
|
@ -107,7 +107,7 @@ The following example shows how a truststore certificate can be defined:
|
|||
----
|
||||
====
|
||||
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/ssl/PemSslBundleProperties.html[`PemSslBundleProperties`] for the full set of supported properties.
|
||||
See javadoc:org.springframework.boot.autoconfigure.ssl.PemSslBundleProperties[] for the full set of supported properties.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ TIP: See the {url-spring-framework-docs}/integration/email.html[reference docume
|
|||
|
||||
If `spring.mail.host` and the relevant libraries (as defined by `spring-boot-starter-mail`) are available, a default `JavaMailSender` is created if none exists.
|
||||
The sender can be further customized by configuration items from the `spring.mail` namespace.
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/mail/MailProperties.html[`MailProperties`] for more details.
|
||||
See javadoc:org.springframework.boot.autoconfigure.mail.MailProperties[] for more details.
|
||||
|
||||
In particular, certain default timeout values are infinite, and you may want to change that to avoid having a thread blocked by an unresponsive mail server, as shown in the following example:
|
||||
|
||||
|
|
|
@ -44,6 +44,6 @@ include-code::xa/MyBean[tag=*]
|
|||
[[io.jta.supporting-embedded-transaction-manager]]
|
||||
== Supporting an Embedded Transaction Manager
|
||||
|
||||
The xref:api:java/org/springframework/boot/jms/XAConnectionFactoryWrapper.html[`XAConnectionFactoryWrapper`] and xref:api:java/org/springframework/boot/jdbc/XADataSourceWrapper.html[`XADataSourceWrapper`] interfaces can be used to support embedded transaction managers.
|
||||
The javadoc:org.springframework.boot.jms.XAConnectionFactoryWrapper[] and javadoc:org.springframework.boot.jdbc.XADataSourceWrapper[] interfaces can be used to support embedded transaction managers.
|
||||
The interfaces are responsible for wrapping `XAConnectionFactory` and `XADataSource` beans and exposing them as regular `ConnectionFactory` and `DataSource` beans, which transparently enroll in the distributed transaction.
|
||||
DataSource and JMS auto-configuration use JTA variants, provided you have a `JtaTransactionManager` bean and appropriate XA wrapper beans registered within your `ApplicationContext`.
|
||||
|
|
|
@ -38,7 +38,7 @@ spring:
|
|||
NOTE: When specifying addresses that way, the `host` and `port` properties are ignored.
|
||||
If the address uses the `amqps` protocol, SSL support is enabled automatically.
|
||||
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.html[`RabbitProperties`] for more of the supported property-based configuration options.
|
||||
See javadoc:org.springframework.boot.autoconfigure.amqp.RabbitProperties[] for more of the supported property-based configuration options.
|
||||
To configure lower-level details of the RabbitMQ `ConnectionFactory` that is used by Spring AMQP, define a `ConnectionFactoryCustomizer` bean.
|
||||
|
||||
If a `ConnectionNameStrategy` bean exists in the context, it will be automatically used to name connections created by the auto-configured `CachingConnectionFactory`.
|
||||
|
|
|
@ -48,7 +48,7 @@ spring:
|
|||
max-connections: 50
|
||||
----
|
||||
|
||||
TIP: See xref:api:java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.html[`ActiveMQProperties`] for more of the supported options.
|
||||
TIP: See javadoc:org.springframework.boot.autoconfigure.jms.activemq.ActiveMQProperties[] for more of the supported options.
|
||||
You can also register an arbitrary number of beans that implement `ActiveMQConnectionFactoryCustomizer` for more advanced customizations.
|
||||
|
||||
By default, ActiveMQ "Classic" creates a destination if it does not yet exist so that destinations are resolved against their provided names.
|
||||
|
@ -103,7 +103,7 @@ spring:
|
|||
max-connections: 50
|
||||
----
|
||||
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisProperties.html[`ArtemisProperties`] for more supported options.
|
||||
See javadoc:org.springframework.boot.autoconfigure.jms.artemis.ArtemisProperties[] for more supported options.
|
||||
|
||||
No JNDI lookup is involved, and destinations are resolved against their names, using either the `name` attribute in the ActiveMQ Artemis configuration or the names provided through configuration.
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ spring:
|
|||
TIP: To create a topic on startup, add a bean of type `NewTopic`.
|
||||
If the topic already exists, the bean is ignored.
|
||||
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.html[`KafkaProperties`] for more supported options.
|
||||
See javadoc:org.springframework.boot.autoconfigure.kafka.KafkaProperties[] for more supported options.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -46,4 +46,4 @@ spring:
|
|||
uri: "ws://example.org"
|
||||
----
|
||||
|
||||
See the {code-spring-boot-autoconfigure-src}/integration/IntegrationAutoConfiguration.java[`IntegrationAutoConfiguration`] and xref:api:java/org/springframework/boot/autoconfigure/integration/IntegrationProperties.html[`IntegrationProperties`] classes for more details.
|
||||
See the {code-spring-boot-autoconfigure-src}/integration/IntegrationAutoConfiguration.java[`IntegrationAutoConfiguration`] and javadoc:org.springframework.boot.autoconfigure.integration.IntegrationProperties[] classes for more details.
|
||||
|
|
|
@ -118,7 +118,7 @@ You can then import the class explicitly where it is required, as shown in the f
|
|||
include-code::MyTests[]
|
||||
|
||||
NOTE: If you directly use `@ComponentScan` (that is, not through `@SpringBootApplication`) you need to register the `TypeExcludeFilter` with it.
|
||||
See the xref:api:java/org/springframework/boot/context/TypeExcludeFilter.html[`TypeExcludeFilter`] API documentation for details.
|
||||
See the javadoc:org.springframework.boot.context.TypeExcludeFilter[] API documentation for details.
|
||||
|
||||
NOTE: An imported `@TestConfiguration` is processed earlier than an inner-class `@TestConfiguration` and an imported `@TestConfiguration` will be processed before any configuration found through component scanning.
|
||||
Generally speaking, this difference in ordering has no noticeable effect but it is something to be aware of if you're relying on bean overriding.
|
||||
|
@ -263,7 +263,7 @@ By the time the test is executed, the application context refresh has completed
|
|||
We recommend using a `@Bean` method to create and configure the mock in this situation.
|
||||
|
||||
Additionally, you can use `@SpyBean` to wrap any existing bean with a Mockito `spy`.
|
||||
See the xref:api:java/org/springframework/boot/test/mock/mockito/SpyBean.html[`SpyBean`] API documentation for full details.
|
||||
See the javadoc:org.springframework.boot.test.mock.mockito.SpyBean[] API documentation for full details.
|
||||
|
||||
NOTE: While Spring's test framework caches application contexts between tests and reuses a context for tests sharing the same configuration, the use of `@MockBean` or `@SpyBean` influences the cache key, which will most likely increase the number of contexts.
|
||||
|
||||
|
@ -536,7 +536,7 @@ If that is not what you want, you can disable transaction management for a test
|
|||
|
||||
include-code::MyNonTransactionalTests[]
|
||||
|
||||
Data JPA tests may also inject a xref:api:java/org/springframework/boot/test/autoconfigure/orm/jpa/TestEntityManager.html[`TestEntityManager`] bean, which provides an alternative to the standard JPA `EntityManager` that is specifically designed for tests.
|
||||
Data JPA tests may also inject a javadoc:org.springframework.boot.test.autoconfigure.orm.jpa.TestEntityManager[] bean, which provides an alternative to the standard JPA `EntityManager` that is specifically designed for tests.
|
||||
|
||||
TIP: `TestEntityManager` can also be auto-configured to any of your Spring-based test class by adding `@AutoConfigureTestEntityManager`.
|
||||
When doing so, make sure that your test is running in a transaction, for instance by adding `@Transactional` on your test class or method.
|
||||
|
|
|
@ -336,7 +336,7 @@ Profile specific filenames (of the form `spring-boot-devtools-<profile>.properti
|
|||
[[using.devtools.globalsettings.configuring-file-system-watcher]]
|
||||
=== Configuring File System Watcher
|
||||
|
||||
xref:api:java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.html[`FileSystemWatcher`] works by polling the class changes with a certain time interval, and then waiting for a predefined quiet period to make sure there are no more changes.
|
||||
javadoc:org.springframework.boot.devtools.filewatch.FileSystemWatcher[] works by polling the class changes with a certain time interval, and then waiting for a predefined quiet period to make sure there are no more changes.
|
||||
Since Spring Boot relies entirely on the IDE to compile and copy files into the location from where Spring Boot can read them, you might find that there are times when certain changes are not reflected when devtools restarts the application.
|
||||
If you observe such problems constantly, try increasing the `spring.devtools.restart.poll-interval` and `spring.devtools.restart.quiet-period` parameters to the values that fit your development environment:
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ The exact way in which new requests are not permitted varies depending on the we
|
|||
Implementations may stop accepting requests at the network layer, or they may return a response with a specific HTTP status code or HTTP header.
|
||||
The use of persistent connections can also change the way that requests stop being accepted.
|
||||
|
||||
TIP: To learn about more the specific method used with your web server, see the `shutDownGracefully` API documentation for xref:api:java/org/springframework/boot/web/embedded/tomcat/TomcatWebServer.html#shutDownGracefully(org.springframework.boot.web.server.GracefulShutdownCallback)[`TomcatWebServer`], xref:api:java/org/springframework/boot/web/embedded/netty/NettyWebServer.html#shutDownGracefully(org.springframework.boot.web.server.GracefulShutdownCallback)[`NettyWebServer`], xref:api:java/org/springframework/boot/web/embedded/jetty/JettyWebServer.html#shutDownGracefully(org.springframework.boot.web.server.GracefulShutdownCallback)[`JettyWebServer`] or xref:api:java/org/springframework/boot/web/embedded/undertow/UndertowWebServer.html#shutDownGracefully(org.springframework.boot.web.server.GracefulShutdownCallback)[`UndertowWebServer`].
|
||||
TIP: To learn about more the specific method used with your web server, see the `shutDownGracefully` API documentation for javadoc:org.springframework.boot.web.embedded.tomcat.TomcatWebServer#shutDownGracefully(org.springframework.boot.web.server.GracefulShutdownCallback)[], javadoc:org.springframework.boot.web.embedded.netty.NettyWebServer#shutDownGracefully(org.springframework.boot.web.server.GracefulShutdownCallback)[], javadoc:org.springframework.boot.web.embedded.jetty.JettyWebServer#shutDownGracefully(org.springframework.boot.web.server.GracefulShutdownCallback)[] or javadoc:org.springframework.boot.web.embedded.undertow.UndertowWebServer#shutDownGracefully(org.springframework.boot.web.server.GracefulShutdownCallback)[].
|
||||
|
||||
Jetty, Reactor Netty, and Tomcat will stop accepting new requests at the network layer.
|
||||
Undertow will accept new connections but respond immediately with a service unavailable (503) response.
|
||||
|
|
|
@ -297,7 +297,7 @@ Common server settings include:
|
|||
Spring Boot tries as much as possible to expose common settings, but this is not always possible.
|
||||
For those cases, dedicated namespaces such as `server.netty.*` offer server-specific customizations.
|
||||
|
||||
TIP: See the xref:api:java/org/springframework/boot/autoconfigure/web/ServerProperties.html[`ServerProperties`] class for a complete list.
|
||||
TIP: See the javadoc:org.springframework.boot.autoconfigure.web.ServerProperties[] class for a complete list.
|
||||
|
||||
|
||||
|
||||
|
@ -324,7 +324,7 @@ For more advanced use cases that require you to extend from `ReactiveWebServerFa
|
|||
|
||||
Setters are provided for many configuration options.
|
||||
Several protected method "`hooks`" are also provided should you need to do something more exotic.
|
||||
See the xref:api:java/org/springframework/boot/web/reactive/server/ConfigurableReactiveWebServerFactory.html[`ConfigurableReactiveWebServerFactory`] API documentation for details.
|
||||
See the javadoc:org.springframework.boot.web.reactive.server.ConfigurableReactiveWebServerFactory[] API documentation for details.
|
||||
|
||||
NOTE: Auto-configured customizers are still applied on your custom factory, so use that option carefully.
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ spring:
|
|||
|
||||
With this configuration, JavaScript modules located under `"/js/lib/"` use a fixed versioning strategy (`"/v12/js/lib/mymodule.js"`), while other resources still use the content one (`<link href="/css/spring-2a2d595e6ed9a0b24f027f2b63b134d6.css"/>`).
|
||||
|
||||
See xref:api:java/org/springframework/boot/autoconfigure/web/WebProperties.Resources.html[`WebProperties.Resources`] for more supported options.
|
||||
See javadoc:org.springframework.boot.autoconfigure.web.WebProperties$Resources[] for more supported options.
|
||||
|
||||
[TIP]
|
||||
====
|
||||
|
@ -544,7 +544,7 @@ TIP: To see the order of every `Filter` in your application, enable debug level
|
|||
Details of the registered filters, including their order and URL patterns, will then be logged at startup.
|
||||
|
||||
WARNING: Take care when registering `Filter` beans since they are initialized very early in the application lifecycle.
|
||||
If you need to register a `Filter` that interacts with other beans, consider using a xref:api:java/org/springframework/boot/web/servlet/DelegatingFilterProxyRegistrationBean.html[`DelegatingFilterProxyRegistrationBean`] instead.
|
||||
If you need to register a `Filter` that interacts with other beans, consider using a javadoc:org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean[] instead.
|
||||
|
||||
|
||||
|
||||
|
@ -606,7 +606,7 @@ Spring Boot tries as much as possible to expose common settings, but this is not
|
|||
For those cases, dedicated namespaces offer server-specific customizations (see `server.tomcat` and `server.undertow`).
|
||||
For instance, xref:how-to:webserver.adoc#howto.webserver.configure-access-logs[access logs] can be configured with specific features of the embedded servlet container.
|
||||
|
||||
TIP: See the xref:api:java/org/springframework/boot/autoconfigure/web/ServerProperties.html[`ServerProperties`] class for a complete list.
|
||||
TIP: See the javadoc:org.springframework.boot.autoconfigure.web.ServerProperties[] class for a complete list.
|
||||
|
||||
|
||||
|
||||
|
@ -687,7 +687,7 @@ For more advanced use cases that require you to extend from `ServletWebServerFac
|
|||
|
||||
Setters are provided for many configuration options.
|
||||
Several protected method "`hooks`" are also provided should you need to do something more exotic.
|
||||
See the xref:api:java/org/springframework/boot/web/servlet/server/ConfigurableServletWebServerFactory.html[`ConfigurableServletWebServerFactory`] API documentation for details.
|
||||
See the javadoc:org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory[] API documentation for details.
|
||||
|
||||
NOTE: Auto-configured customizers are still applied on your custom factory, so use that option carefully.
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ You can change the username and password by providing a `spring.security.user.na
|
|||
|
||||
The basic features you get by default in a web application are:
|
||||
|
||||
* A `UserDetailsService` (or `ReactiveUserDetailsService` in case of a WebFlux application) bean with in-memory store and a single user with a generated password (see xref:api:java/org/springframework/boot/autoconfigure/security/SecurityProperties.User.html[`SecurityProperties.User`] for the properties of the user).
|
||||
* A `UserDetailsService` (or `ReactiveUserDetailsService` in case of a WebFlux application) bean with in-memory store and a single user with a generated password (see javadoc:org.springframework.boot.autoconfigure.security.SecurityProperties$User[] for the properties of the user).
|
||||
* Form-based login or HTTP Basic security (depending on the `Accept` header in the request) for the entire application (including actuator endpoints if actuator is on the classpath).
|
||||
* A `DefaultAuthenticationEventPublisher` for publishing authentication events.
|
||||
|
||||
|
|
Loading…
Reference in New Issue