mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Replace links to code with links to javadoc
Closes gh-40065
This commit is contained in:
parent
dbd944377a
commit
9f8a26f0f7
@ -70,11 +70,6 @@ apiref-openjdk=https://docs.oracle.com/en/java/javase/17/docs/api
|
|||||||
# === Code Links ===
|
# === Code Links ===
|
||||||
|
|
||||||
code-spring-boot=https://github.com/{github-repo}/tree/{github-ref}
|
code-spring-boot=https://github.com/{github-repo}/tree/{github-ref}
|
||||||
code-spring-boot-src={code-spring-boot}/spring-boot-project/spring-boot/src/main/java/org/springframework/boot
|
|
||||||
code-spring-boot-actuator-autoconfigure-src={code-spring-boot}/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure
|
|
||||||
code-spring-boot-actuator-src={code-spring-boot}/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate
|
|
||||||
code-spring-boot-autoconfigure-src={code-spring-boot}/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
|
code-spring-boot-autoconfigure-src={code-spring-boot}/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
|
||||||
code-spring-boot-devtools-src={code-spring-boot}/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools
|
|
||||||
code-spring-boot-test-autoconfigure-src={code-spring-boot}/spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure
|
|
||||||
code-spring-boot-latest=https://github.com/{github-repo}/tree/main
|
code-spring-boot-latest=https://github.com/{github-repo}/tree/main
|
||||||
|
|
||||||
|
@ -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 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.
|
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 {code-spring-boot-actuator-autoconfigure-src}/web/server/ManagementServerProperties.java[`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 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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.
|
Pay special attention to the `+@Conditional*+` annotations to find out what features they enable and when.
|
||||||
Add `--debug` to the command line or a System property `-Ddebug` to get a log on the console of all the auto-configuration decisions that were made in your app.
|
Add `--debug` to the command line or a 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.
|
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 {code-spring-boot-autoconfigure-src}/web/ServerProperties.java[`ServerProperties`]) and read from there the available external configuration options.
|
* 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.
|
||||||
The `@ConfigurationProperties` annotation has a `name` attribute that acts as a prefix to external properties.
|
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.
|
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.
|
In a running application with actuator enabled, look at the `configprops` endpoint.
|
||||||
|
@ -34,12 +34,12 @@ 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.
|
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 {code-spring-boot-autoconfigure-src}/batch/JobLauncherApplicationRunner.java[`JobLauncherApplicationRunner`] for details).
|
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 multiple `Job` beans are found, the job that should be executed must be specified using configprop:spring.batch.job.name[].
|
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`.
|
To disable running a `Job` found in the application context, set the configprop:spring.batch.job.enabled[] to `false`.
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/batch/BatchAutoConfiguration.java[BatchAutoConfiguration] for more details.
|
See {code-spring-boot-autoconfigure-src}/batch/BatchAutoConfiguration.java[`BatchAutoConfiguration`] for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -381,6 +381,6 @@ include-code::ElasticsearchEntityManagerFactoryDependsOnPostProcessor[]
|
|||||||
== Configure jOOQ with Two DataSources
|
== Configure jOOQ with Two DataSources
|
||||||
|
|
||||||
If you need to use jOOQ with multiple data sources, you should create your own `DSLContext` for each one.
|
If you need to use jOOQ with multiple data sources, you should create your own `DSLContext` for each one.
|
||||||
See {code-spring-boot-autoconfigure-src}/jooq/JooqAutoConfiguration.java[JooqAutoConfiguration] for more details.
|
See {code-spring-boot-autoconfigure-src}/jooq/JooqAutoConfiguration.java[`JooqAutoConfiguration`] for more details.
|
||||||
|
|
||||||
TIP: In particular, `JooqExceptionTranslator` and `SpringTransactionProvider` can be reused to provide similar features to what the auto-configuration does with a single `DataSource`.
|
TIP: In particular, `JooqExceptionTranslator` and `SpringTransactionProvider` can be reused to provide similar features to what the auto-configuration does with a single `DataSource`.
|
||||||
|
@ -131,16 +131,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).
|
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 {code-spring-boot-src}/jdbc/DatabaseDriver.java[`DatabaseDriver`].
|
The list of supported databases is available in xref:api:java/org/springframework/boot/jdbc/DatabaseDriver.html[`DatabaseDriver`].
|
||||||
|
|
||||||
Migrations can also be written in Java.
|
Migrations can also be written in Java.
|
||||||
Flyway will be auto-configured with any beans that implement `JavaMigration`.
|
Flyway will be auto-configured with any beans that implement `JavaMigration`.
|
||||||
|
|
||||||
{code-spring-boot-autoconfigure-src}/flyway/FlywayProperties.java[`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.
|
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.
|
||||||
If you need more control over the configuration, consider registering a `FlywayConfigurationCustomizer` bean.
|
If you need more control over the configuration, consider registering a `FlywayConfigurationCustomizer` bean.
|
||||||
|
|
||||||
Spring Boot calls `Flyway.migrate()` to perform the database migration.
|
Spring Boot calls `Flyway.migrate()` to perform the database migration.
|
||||||
If you would like more control, provide a `@Bean` that implements {code-spring-boot-autoconfigure-src}/flyway/FlywayMigrationStrategy.java[`FlywayMigrationStrategy`].
|
If you would like more control, provide a `@Bean` that implements xref:api:java/org/springframework/boot/autoconfigure/flyway/FlywayMigrationStrategy.html[`FlywayMigrationStrategy`].
|
||||||
|
|
||||||
Flyway supports SQL and Java https://flywaydb.org/documentation/concepts/callbacks[callbacks].
|
Flyway supports SQL and Java https://flywaydb.org/documentation/concepts/callbacks[callbacks].
|
||||||
To use SQL-based callbacks, place the callback scripts in the `classpath:db/migration` directory.
|
To use SQL-based callbacks, place the callback scripts in the `classpath:db/migration` directory.
|
||||||
@ -194,7 +194,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`.
|
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.
|
If any of the three properties has not been set, the value of its equivalent `spring.datasource` property will be used.
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/liquibase/LiquibaseProperties.java[`LiquibaseProperties`] for details about available settings such as contexts, the default schema, and others.
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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).
|
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 {code-spring-boot-autoconfigure-src}/web/ServerProperties.java[`ServerProperties`] source code.
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ server:
|
|||||||
|
|
||||||
NOTE: The `server.ssl.bundle` property can not be combined with the discrete Java KeyStore or PEM property options under `server.ssl`.
|
NOTE: The `server.ssl.bundle` property can not be combined with the discrete Java KeyStore or PEM property options under `server.ssl`.
|
||||||
|
|
||||||
See {code-spring-boot-src}/web/server/Ssl.java[`Ssl`] for details of all of the supported properties.
|
See xref:api:java/org/springframework/boot/web/server/Ssl.html[`Ssl`] for details of all of the supported properties.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -365,7 +365,7 @@ management:
|
|||||||
allowed-methods: "GET,POST"
|
allowed-methods: "GET,POST"
|
||||||
----
|
----
|
||||||
|
|
||||||
TIP: See {code-spring-boot-actuator-autoconfigure-src}/endpoint/web/CorsEndpointProperties.java[`CorsEndpointProperties`] for a complete list of options.
|
TIP: See xref:api:java/org/springframework/boot/actuate/autoconfigure/endpoint/web/CorsEndpointProperties.html[`CorsEndpointProperties`] for a complete list of options.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -585,7 +585,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.
|
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 {code-spring-boot-actuator-src}/health/HealthContributorRegistry.java[`HealthContributorRegistry`] (by default, all {code-spring-boot-actuator-src}/health/HealthContributor.java[`HealthContributor`] instances defined in your `ApplicationContext`).
|
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`).
|
||||||
Spring Boot includes a number of auto-configured `HealthContributors`, and you can also write your own.
|
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`.
|
A `HealthContributor` can be either a `HealthIndicator` or a `CompositeHealthContributor`.
|
||||||
@ -613,63 +613,63 @@ with the `key` listed in the following table:
|
|||||||
| Key | Name | Description
|
| Key | Name | Description
|
||||||
|
|
||||||
| `cassandra`
|
| `cassandra`
|
||||||
| {code-spring-boot-actuator-src}/cassandra/CassandraDriverHealthIndicator.java[`CassandraDriverHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/cassandra/CassandraDriverHealthIndicator.html[`CassandraDriverHealthIndicator`]
|
||||||
| Checks that a Cassandra database is up.
|
| Checks that a Cassandra database is up.
|
||||||
|
|
||||||
| `couchbase`
|
| `couchbase`
|
||||||
| {code-spring-boot-actuator-src}/couchbase/CouchbaseHealthIndicator.java[`CouchbaseHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/couchbase/CouchbaseHealthIndicator.html[`CouchbaseHealthIndicator`]
|
||||||
| Checks that a Couchbase cluster is up.
|
| Checks that a Couchbase cluster is up.
|
||||||
|
|
||||||
| `db`
|
| `db`
|
||||||
| {code-spring-boot-actuator-src}/jdbc/DataSourceHealthIndicator.java[`DataSourceHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/jdbc/DataSourceHealthIndicator.html[`DataSourceHealthIndicator`]
|
||||||
| Checks that a connection to `DataSource` can be obtained.
|
| Checks that a connection to `DataSource` can be obtained.
|
||||||
|
|
||||||
| `diskspace`
|
| `diskspace`
|
||||||
| {code-spring-boot-actuator-src}/system/DiskSpaceHealthIndicator.java[`DiskSpaceHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/system/DiskSpaceHealthIndicator.html[`DiskSpaceHealthIndicator`]
|
||||||
| Checks for low disk space.
|
| Checks for low disk space.
|
||||||
|
|
||||||
| `elasticsearch`
|
| `elasticsearch`
|
||||||
| {code-spring-boot-actuator-src}/elasticsearch/ElasticsearchRestClientHealthIndicator.java[`ElasticsearchRestClientHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/elasticsearch/ElasticsearchRestClientHealthIndicator.html[`ElasticsearchRestClientHealthIndicator`]
|
||||||
| Checks that an Elasticsearch cluster is up.
|
| Checks that an Elasticsearch cluster is up.
|
||||||
|
|
||||||
| `hazelcast`
|
| `hazelcast`
|
||||||
| {code-spring-boot-actuator-src}/hazelcast/HazelcastHealthIndicator.java[`HazelcastHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/hazelcast/HazelcastHealthIndicator.html[`HazelcastHealthIndicator`]
|
||||||
| Checks that a Hazelcast server is up.
|
| Checks that a Hazelcast server is up.
|
||||||
|
|
||||||
| `influxdb`
|
| `influxdb`
|
||||||
| {code-spring-boot-actuator-src}/influx/InfluxDbHealthIndicator.java[`InfluxDbHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/influx/InfluxDbHealthIndicator.html[`InfluxDbHealthIndicator`]
|
||||||
| Checks that an InfluxDB server is up.
|
| Checks that an InfluxDB server is up.
|
||||||
|
|
||||||
| `jms`
|
| `jms`
|
||||||
| {code-spring-boot-actuator-src}/jms/JmsHealthIndicator.java[`JmsHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/jms/JmsHealthIndicator.html[`JmsHealthIndicator`]
|
||||||
| Checks that a JMS broker is up.
|
| Checks that a JMS broker is up.
|
||||||
|
|
||||||
| `ldap`
|
| `ldap`
|
||||||
| {code-spring-boot-actuator-src}/ldap/LdapHealthIndicator.java[`LdapHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/ldap/LdapHealthIndicator.html[`LdapHealthIndicator`]
|
||||||
| Checks that an LDAP server is up.
|
| Checks that an LDAP server is up.
|
||||||
|
|
||||||
| `mail`
|
| `mail`
|
||||||
| {code-spring-boot-actuator-src}/mail/MailHealthIndicator.java[`MailHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/mail/MailHealthIndicator.html[`MailHealthIndicator`]
|
||||||
| Checks that a mail server is up.
|
| Checks that a mail server is up.
|
||||||
|
|
||||||
| `mongo`
|
| `mongo`
|
||||||
| {code-spring-boot-actuator-src}/data/mongo/MongoHealthIndicator.java[`MongoHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/data/mongo/MongoHealthIndicator.html[`MongoHealthIndicator`]
|
||||||
| Checks that a Mongo database is up.
|
| Checks that a Mongo database is up.
|
||||||
|
|
||||||
| `neo4j`
|
| `neo4j`
|
||||||
| {code-spring-boot-actuator-src}/neo4j/Neo4jHealthIndicator.java[`Neo4jHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicator.html[`Neo4jHealthIndicator`]
|
||||||
| Checks that a Neo4j database is up.
|
| Checks that a Neo4j database is up.
|
||||||
|
|
||||||
| `ping`
|
| `ping`
|
||||||
| {code-spring-boot-actuator-src}/health/PingHealthIndicator.java[`PingHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/health/PingHealthIndicator.html[`PingHealthIndicator`]
|
||||||
| Always responds with `UP`.
|
| Always responds with `UP`.
|
||||||
|
|
||||||
| `rabbit`
|
| `rabbit`
|
||||||
| {code-spring-boot-actuator-src}/amqp/RabbitHealthIndicator.java[`RabbitHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/amqp/RabbitHealthIndicator.html[`RabbitHealthIndicator`]
|
||||||
| Checks that a Rabbit server is up.
|
| Checks that a Rabbit server is up.
|
||||||
|
|
||||||
| `redis`
|
| `redis`
|
||||||
| {code-spring-boot-actuator-src}/data/redis/RedisHealthIndicator.java[`RedisHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/data/redis/RedisHealthIndicator.html[`RedisHealthIndicator`]
|
||||||
| Checks that a Redis server is up.
|
| Checks that a Redis server is up.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
@ -682,11 +682,11 @@ Additional `HealthIndicators` are available but are not enabled by default:
|
|||||||
| Key | Name | Description
|
| Key | Name | Description
|
||||||
|
|
||||||
| `livenessstate`
|
| `livenessstate`
|
||||||
| {code-spring-boot-actuator-src}/availability/LivenessStateHealthIndicator.java[`LivenessStateHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/availability/LivenessStateHealthIndicator.html[`LivenessStateHealthIndicator`]
|
||||||
| Exposes the "`Liveness`" application availability state.
|
| Exposes the "`Liveness`" application availability state.
|
||||||
|
|
||||||
| `readinessstate`
|
| `readinessstate`
|
||||||
| {code-spring-boot-actuator-src}/availability/ReadinessStateHealthIndicator.java[`ReadinessStateHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/availability/ReadinessStateHealthIndicator.html[`ReadinessStateHealthIndicator`]
|
||||||
| Exposes the "`Readiness`" application availability state.
|
| Exposes the "`Readiness`" application availability state.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
@ -695,7 +695,7 @@ Additional `HealthIndicators` are available but are not enabled by default:
|
|||||||
[[actuator.endpoints.health.writing-custom-health-indicators]]
|
[[actuator.endpoints.health.writing-custom-health-indicators]]
|
||||||
=== Writing Custom HealthIndicators
|
=== Writing Custom HealthIndicators
|
||||||
|
|
||||||
To provide custom health information, you can register Spring beans that implement the {code-spring-boot-actuator-src}/health/HealthIndicator.java[`HealthIndicator`] interface.
|
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.
|
||||||
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.
|
||||||
The `Health` response should include a status and can optionally include additional details to be displayed.
|
The `Health` response should include a status and can optionally include additional details to be displayed.
|
||||||
The following code shows a sample `HealthIndicator` implementation:
|
The following code shows a sample `HealthIndicator` implementation:
|
||||||
@ -709,8 +709,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.
|
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.
|
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 {code-spring-boot-actuator-src}/health/Status.java[`Status`] types, `Health` can return a custom `Status` that represents a new system state.
|
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 {code-spring-boot-actuator-src}/health/StatusAggregator.java[`StatusAggregator`] interface, or you must configure the default implementation by using the configprop:management.endpoint.health.status.order[] configuration property.
|
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.
|
||||||
|
|
||||||
For example, assume a new `Status` with a code of `FATAL` is being used in one of your `HealthIndicator` implementations.
|
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:
|
To configure the severity order, add the following property to your application properties:
|
||||||
@ -771,13 +771,13 @@ The following table shows the default status mappings for the built-in statuses:
|
|||||||
=== Reactive Health Indicators
|
=== Reactive Health Indicators
|
||||||
|
|
||||||
For reactive applications, such as those that use Spring WebFlux, `ReactiveHealthContributor` provides a non-blocking contract for getting application health.
|
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 {code-spring-boot-actuator-src}/health/ReactiveHealthContributorRegistry.java[`ReactiveHealthContributorRegistry`] (by default, all {code-spring-boot-actuator-src}/health/HealthContributor.java[`HealthContributor`] and {code-spring-boot-actuator-src}/health/ReactiveHealthContributor.java[`ReactiveHealthContributor`] instances defined in your `ApplicationContext`).
|
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`).
|
||||||
Regular `HealthContributors` that do not check against a reactive API are executed on the elastic scheduler.
|
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.
|
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`.
|
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 {code-spring-boot-actuator-src}/health/ReactiveHealthIndicator.java[`ReactiveHealthIndicator`] interface.
|
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.
|
||||||
The following code shows a sample `ReactiveHealthIndicator` implementation:
|
The following code shows a sample `ReactiveHealthIndicator` implementation:
|
||||||
|
|
||||||
include-code::MyReactiveHealthIndicator[]
|
include-code::MyReactiveHealthIndicator[]
|
||||||
@ -796,27 +796,27 @@ When appropriate, Spring Boot auto-configures the following `ReactiveHealthIndic
|
|||||||
| Key | Name | Description
|
| Key | Name | Description
|
||||||
|
|
||||||
| `cassandra`
|
| `cassandra`
|
||||||
| {code-spring-boot-actuator-src}/cassandra/CassandraDriverReactiveHealthIndicator.java[`CassandraDriverReactiveHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/cassandra/CassandraDriverReactiveHealthIndicator.html[`CassandraDriverReactiveHealthIndicator`]
|
||||||
| Checks that a Cassandra database is up.
|
| Checks that a Cassandra database is up.
|
||||||
|
|
||||||
| `couchbase`
|
| `couchbase`
|
||||||
| {code-spring-boot-actuator-src}/couchbase/CouchbaseReactiveHealthIndicator.java[`CouchbaseReactiveHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/couchbase/CouchbaseReactiveHealthIndicator.html[`CouchbaseReactiveHealthIndicator`]
|
||||||
| Checks that a Couchbase cluster is up.
|
| Checks that a Couchbase cluster is up.
|
||||||
|
|
||||||
| `elasticsearch`
|
| `elasticsearch`
|
||||||
| {code-spring-boot-actuator-src}/data/elasticsearch/ElasticsearchReactiveHealthIndicator.java[`ElasticsearchReactiveHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/data/elasticsearch/ElasticsearchReactiveHealthIndicator.html[`ElasticsearchReactiveHealthIndicator`]
|
||||||
| Checks that an Elasticsearch cluster is up.
|
| Checks that an Elasticsearch cluster is up.
|
||||||
|
|
||||||
| `mongo`
|
| `mongo`
|
||||||
| {code-spring-boot-actuator-src}/data/mongo/MongoReactiveHealthIndicator.java[`MongoReactiveHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/data/mongo/MongoReactiveHealthIndicator.html[`MongoReactiveHealthIndicator`]
|
||||||
| Checks that a Mongo database is up.
|
| Checks that a Mongo database is up.
|
||||||
|
|
||||||
| `neo4j`
|
| `neo4j`
|
||||||
| {code-spring-boot-actuator-src}/neo4j/Neo4jReactiveHealthIndicator.java[`Neo4jReactiveHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/neo4j/Neo4jReactiveHealthIndicator.html[`Neo4jReactiveHealthIndicator`]
|
||||||
| Checks that a Neo4j database is up.
|
| Checks that a Neo4j database is up.
|
||||||
|
|
||||||
| `redis`
|
| `redis`
|
||||||
| {code-spring-boot-actuator-src}/data/redis/RedisReactiveHealthIndicator.java[`RedisReactiveHealthIndicator`]
|
| xref:api:java/org/springframework/boot/actuate/data/redis/RedisReactiveHealthIndicator.html[`RedisReactiveHealthIndicator`]
|
||||||
| Checks that a Redis server is up.
|
| Checks that a Redis server is up.
|
||||||
|===
|
|===
|
||||||
|
|
||||||
@ -1089,7 +1089,7 @@ TIP: See xref:deployment/cloud.adoc#deployment.cloud.kubernetes.container-lifecy
|
|||||||
[[actuator.endpoints.info]]
|
[[actuator.endpoints.info]]
|
||||||
== Application Information
|
== Application Information
|
||||||
|
|
||||||
Application information exposes various information collected from all {code-spring-boot-actuator-src}/info/InfoContributor.java[`InfoContributor`] beans defined in your `ApplicationContext`.
|
Application information exposes various information collected from all xref:api:java/org/springframework/boot/actuate/info/InfoContributor.html[`InfoContributor`] beans defined in your `ApplicationContext`.
|
||||||
Spring Boot includes a number of auto-configured `InfoContributor` beans, and you can write your own.
|
Spring Boot includes a number of auto-configured `InfoContributor` beans, and you can write your own.
|
||||||
|
|
||||||
|
|
||||||
@ -1104,32 +1104,32 @@ When appropriate, Spring auto-configures the following `InfoContributor` beans:
|
|||||||
| ID | Name | Description | Prerequisites
|
| ID | Name | Description | Prerequisites
|
||||||
|
|
||||||
| `build`
|
| `build`
|
||||||
| {code-spring-boot-actuator-src}/info/BuildInfoContributor.java[`BuildInfoContributor`]
|
| xref:api:java/org/springframework/boot/actuate/info/BuildInfoContributor.html[`BuildInfoContributor`]
|
||||||
| Exposes build information.
|
| Exposes build information.
|
||||||
| A `META-INF/build-info.properties` resource.
|
| A `META-INF/build-info.properties` resource.
|
||||||
|
|
||||||
| `env`
|
| `env`
|
||||||
| {code-spring-boot-actuator-src}/info/EnvironmentInfoContributor.java[`EnvironmentInfoContributor`]
|
| xref:api:java/org/springframework/boot/actuate/info/EnvironmentInfoContributor.html[`EnvironmentInfoContributor`]
|
||||||
| Exposes any property from the `Environment` whose name starts with `info.`.
|
| Exposes any property from the `Environment` whose name starts with `info.`.
|
||||||
| None.
|
| None.
|
||||||
|
|
||||||
| `git`
|
| `git`
|
||||||
| {code-spring-boot-actuator-src}/info/GitInfoContributor.java[`GitInfoContributor`]
|
| xref:api:java/org/springframework/boot/actuate/info/GitInfoContributor.html[`GitInfoContributor`]
|
||||||
| Exposes git information.
|
| Exposes git information.
|
||||||
| A `git.properties` resource.
|
| A `git.properties` resource.
|
||||||
|
|
||||||
| `java`
|
| `java`
|
||||||
| {code-spring-boot-actuator-src}/info/JavaInfoContributor.java[`JavaInfoContributor`]
|
| xref:api:java/org/springframework/boot/actuate/info/JavaInfoContributor.html[`JavaInfoContributor`]
|
||||||
| Exposes Java runtime information.
|
| Exposes Java runtime information.
|
||||||
| None.
|
| None.
|
||||||
|
|
||||||
| `os`
|
| `os`
|
||||||
| {code-spring-boot-actuator-src}/info/OsInfoContributor.java[`OsInfoContributor`]
|
| xref:api:java/org/springframework/boot/actuate/info/OsInfoContributor.html[`OsInfoContributor`]
|
||||||
| Exposes Operating System information.
|
| Exposes Operating System information.
|
||||||
| None.
|
| None.
|
||||||
|
|
||||||
| `process`
|
| `process`
|
||||||
| {code-spring-boot-actuator-src}/info/ProcessInfoContributor.java[`ProcessInfoContributor`]
|
| xref:api:java/org/springframework/boot/actuate/info/ProcessInfoContributor.html[`ProcessInfoContributor`]
|
||||||
| Exposes process information.
|
| Exposes process information.
|
||||||
| None.
|
| None.
|
||||||
|
|
||||||
@ -1251,7 +1251,7 @@ The `info` endpoint publishes information about your process, see xref:api:java/
|
|||||||
[[actuator.endpoints.info.writing-custom-info-contributors]]
|
[[actuator.endpoints.info.writing-custom-info-contributors]]
|
||||||
=== Writing Custom InfoContributors
|
=== Writing Custom InfoContributors
|
||||||
|
|
||||||
To provide custom application information, you can register Spring beans that implement the {code-spring-boot-actuator-src}/info/InfoContributor.java[`InfoContributor`] interface.
|
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.
|
||||||
|
|
||||||
The following example contributes an `example` entry with a single value:
|
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.
|
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.
|
In other words, if you set `spring.datasource.driver-class-name=com.mysql.jdbc.Driver`, then that class has to be loadable.
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/jdbc/DataSourceProperties.java[`DataSourceProperties`] for more of the supported options.
|
See xref:api:java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.html[`DataSourceProperties`] 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].
|
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.*+`).
|
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.
|
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.
|
Furthermore, auto-configuration classes should not enable component scanning to find additional components.
|
||||||
Specific `@Import` annotations should be used instead.
|
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 {code-spring-boot-autoconfigure-src}/AutoConfiguration.java[`@AutoConfiguration`] annotation or the dedicated {code-spring-boot-autoconfigure-src}/AutoConfigureBefore.java[`@AutoConfigureBefore`] and {code-spring-boot-autoconfigure-src}/AutoConfigureAfter.java[`@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 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.
|
||||||
For example, if you provide web-specific configuration, your class may need to be applied after `WebMvcAutoConfiguration`.
|
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`.
|
If you want to order certain auto-configurations that should not have any direct knowledge of each other, you can also use `@AutoConfigureOrder`.
|
||||||
|
@ -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.
|
TIP: `spring.messages.basename` supports comma-separated list of locations, either a package qualifier or a resource resolved from the classpath root.
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/context/MessageSourceProperties.java[`MessageSourceProperties`] for more supported options.
|
See xref:api:java/org/springframework/boot/autoconfigure/context/MessageSourceProperties.html[`MessageSourceProperties`] for more supported options.
|
||||||
|
@ -34,7 +34,7 @@ include-code::MyJsonComponent[]
|
|||||||
All `@JsonComponent` beans in the `ApplicationContext` are automatically registered with Jackson.
|
All `@JsonComponent` beans in the `ApplicationContext` are automatically registered with Jackson.
|
||||||
Because `@JsonComponent` is meta-annotated with `@Component`, the usual component-scanning rules apply.
|
Because `@JsonComponent` is meta-annotated with `@Component`, the usual component-scanning rules apply.
|
||||||
|
|
||||||
Spring Boot also provides {code-spring-boot-src}/jackson/JsonObjectSerializer.java[`JsonObjectSerializer`] and {code-spring-boot-src}/jackson/JsonObjectDeserializer.java[`JsonObjectDeserializer`] base classes that provide useful alternatives to the standard Jackson versions when serializing objects.
|
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 Javadoc for details.
|
See xref:api:java/org/springframework/boot/jackson/JsonObjectSerializer.html[`JsonObjectSerializer`] and xref:api:java/org/springframework/boot/jackson/JsonObjectDeserializer.html[`JsonObjectDeserializer`] in the Javadoc for details.
|
||||||
|
|
||||||
The example above can be rewritten to use `JsonObjectSerializer`/`JsonObjectDeserializer` as follows:
|
The example above can be rewritten to use `JsonObjectSerializer`/`JsonObjectDeserializer` as follows:
|
||||||
|
@ -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}`)
|
| `${Ansi.NAME}` (or `${AnsiColor.NAME}`, `${AnsiBackground.NAME}`, `${AnsiStyle.NAME}`)
|
||||||
| Where `NAME` is the name of an ANSI escape code.
|
| Where `NAME` is the name of an ANSI escape code.
|
||||||
See {code-spring-boot-src}/ansi/AnsiPropertySource.java[`AnsiPropertySource`] for details.
|
See xref:api:java/org/springframework/boot/ansi/AnsiPropertySource.html[`AnsiPropertySource`] for details.
|
||||||
|
|
||||||
| `${application.title}`
|
| `${application.title}`
|
||||||
| The title of your application, as declared in `MANIFEST.MF`.
|
| The title of your application, as declared in `MANIFEST.MF`.
|
||||||
@ -360,7 +360,7 @@ To control the order in which the generators are called, additionally implement
|
|||||||
== Admin Features
|
== Admin Features
|
||||||
|
|
||||||
It is possible to enable admin-related features for the application by specifying the configprop:spring.application.admin.enabled[] property.
|
It is possible to enable admin-related features for the application by specifying the configprop:spring.application.admin.enabled[] property.
|
||||||
This exposes the {code-spring-boot-src}/admin/SpringApplicationAdminMXBean.java[`SpringApplicationAdminMXBean`] on the platform `MBeanServer`.
|
This exposes the xref:api:java/org/springframework/boot/admin/SpringApplicationAdminMXBean.html[`SpringApplicationAdminMXBean`] on the platform `MBeanServer`.
|
||||||
You could use this feature to administer your Spring Boot application remotely.
|
You could use this feature to administer your Spring Boot application remotely.
|
||||||
This feature could also be useful for any service wrapper implementation.
|
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"
|
password: "secret"
|
||||||
----
|
----
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/ssl/JksSslBundleProperties.java[JksSslBundleProperties] for the full set of supported properties.
|
See xref:api:java/org/springframework/boot/autoconfigure/ssl/JksSslBundleProperties.html[`JksSslBundleProperties`] for the full set of supported properties.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ The following example shows how a truststore certificate can be defined:
|
|||||||
----
|
----
|
||||||
====
|
====
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/ssl/PemSslBundleProperties.java[PemSslBundleProperties] for the full set of supported properties.
|
See xref:api:java/org/springframework/boot/autoconfigure/ssl/PemSslBundleProperties.html[`PemSslBundleProperties`] for the full set of supported properties.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ If that is not what you want, you can disable transaction management for a test
|
|||||||
|
|
||||||
include-code::MyNonTransactionalTests[]
|
include-code::MyNonTransactionalTests[]
|
||||||
|
|
||||||
Data JPA tests may also inject a {code-spring-boot-test-autoconfigure-src}/orm/jpa/TestEntityManager.java[`TestEntityManager`] bean, which provides an alternative to the standard JPA `EntityManager` that is specifically designed for tests.
|
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.
|
||||||
|
|
||||||
TIP: `TestEntityManager` can also be auto-configured to any of your Spring-based test class by adding `@AutoConfigureTestEntityManager`.
|
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.
|
When doing so, make sure that your test is running in a transaction, for instance by adding `@Transactional` on your test class or method.
|
||||||
|
@ -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.
|
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.
|
The sender can be further customized by configuration items from the `spring.mail` namespace.
|
||||||
See {code-spring-boot-autoconfigure-src}/mail/MailProperties.java[`MailProperties`] for more details.
|
See xref:api:java/org/springframework/boot/autoconfigure/mail/MailProperties.html[`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:
|
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]]
|
[[io.jta.supporting-embedded-transaction-manager]]
|
||||||
== Supporting an Embedded Transaction Manager
|
== Supporting an Embedded Transaction Manager
|
||||||
|
|
||||||
The {code-spring-boot-src}/jms/XAConnectionFactoryWrapper.java[`XAConnectionFactoryWrapper`] and {code-spring-boot-src}/jdbc/XADataSourceWrapper.java[`XADataSourceWrapper`] interfaces can be used to support embedded transaction managers.
|
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 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.
|
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`.
|
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.
|
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.
|
If the address uses the `amqps` protocol, SSL support is enabled automatically.
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/amqp/RabbitProperties.java[`RabbitProperties`] for more of the supported property-based configuration options.
|
See xref:api:java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.html[`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.
|
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`.
|
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
|
max-connections: 50
|
||||||
----
|
----
|
||||||
|
|
||||||
TIP: See {code-spring-boot-autoconfigure-src}/jms/activemq/ActiveMQProperties.java[`ActiveMQProperties`] for more of the supported options.
|
TIP: See xref:api:java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQProperties.html[`ActiveMQProperties`] for more of the supported options.
|
||||||
You can also register an arbitrary number of beans that implement `ActiveMQConnectionFactoryCustomizer` for more advanced customizations.
|
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.
|
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
|
max-connections: 50
|
||||||
----
|
----
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/jms/artemis/ArtemisProperties.java[`ArtemisProperties`] for more supported options.
|
See xref:api:java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisProperties.html[`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.
|
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`.
|
TIP: To create a topic on startup, add a bean of type `NewTopic`.
|
||||||
If the topic already exists, the bean is ignored.
|
If the topic already exists, the bean is ignored.
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/kafka/KafkaProperties.java[`KafkaProperties`] for more supported options.
|
See xref:api:java/org/springframework/boot/autoconfigure/kafka/KafkaProperties.html[`KafkaProperties`] for more supported options.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,4 +46,4 @@ spring:
|
|||||||
uri: "ws://example.org"
|
uri: "ws://example.org"
|
||||||
----
|
----
|
||||||
|
|
||||||
See the {code-spring-boot-autoconfigure-src}/integration/IntegrationAutoConfiguration.java[`IntegrationAutoConfiguration`] and {code-spring-boot-autoconfigure-src}/integration/IntegrationProperties.java[`IntegrationProperties`] classes for more details.
|
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.
|
||||||
|
@ -333,7 +333,7 @@ Profile specific filenames (of the form `spring-boot-devtools-<profile>.properti
|
|||||||
[[using.devtools.globalsettings.configuring-file-system-watcher]]
|
[[using.devtools.globalsettings.configuring-file-system-watcher]]
|
||||||
=== Configuring File System Watcher
|
=== Configuring File System Watcher
|
||||||
|
|
||||||
{code-spring-boot-devtools-src}/filewatch/FileSystemWatcher.java[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.
|
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.
|
||||||
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.
|
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:
|
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:
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ Common server settings include:
|
|||||||
Spring Boot tries as much as possible to expose common settings, but this is not always possible.
|
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.
|
For those cases, dedicated namespaces such as `server.netty.*` offer server-specific customizations.
|
||||||
|
|
||||||
TIP: See the {code-spring-boot-autoconfigure-src}/web/ServerProperties.java[`ServerProperties`] class for a complete list.
|
TIP: See the xref:api:java/org/springframework/boot/autoconfigure/web/ServerProperties.html[`ServerProperties`] class for a complete list.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -189,7 +189,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"/>`).
|
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 {code-spring-boot-autoconfigure-src}/web/WebProperties.java[`WebProperties.Resources`] for more supported options.
|
See xref:api:java/org/springframework/boot/autoconfigure/web/WebProperties.Resources.html[`WebProperties.Resources`] for more supported options.
|
||||||
|
|
||||||
[TIP]
|
[TIP]
|
||||||
====
|
====
|
||||||
@ -600,7 +600,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 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.
|
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 {code-spring-boot-autoconfigure-src}/web/ServerProperties.java[`ServerProperties`] class for a complete list.
|
TIP: See the xref:api:java/org/springframework/boot/autoconfigure/web/ServerProperties.html[`ServerProperties`] class for a complete list.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user