diff --git a/buildSrc/src/main/java/org/springframework/boot/build/antora/AntoraAsciidocAttributes.java b/buildSrc/src/main/java/org/springframework/boot/build/antora/AntoraAsciidocAttributes.java index 5773ce084dd..481a0612890 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/antora/AntoraAsciidocAttributes.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/antora/AntoraAsciidocAttributes.java @@ -203,16 +203,16 @@ public class AntoraAsciidocAttributes { private void addUrlJava(Map attributes) { attributes.put("url-javase-javadoc", "https://docs.oracle.com/en/java/javase/17/docs/api/"); - attributes.put("javadoc-location-java-beans", "{url-javase-javadoc}"); - attributes.put("javadoc-location-java-lang", "{url-javase-javadoc}"); - attributes.put("javadoc-location-java-net", "{url-javase-javadoc}"); - attributes.put("javadoc-location-java-io", "{url-javase-javadoc}"); - attributes.put("javadoc-location-java-time", "{url-javase-javadoc}"); - attributes.put("javadoc-location-java-util", "{url-javase-javadoc}"); - attributes.put("javadoc-location-javax-management", "{url-javase-javadoc}"); - attributes.put("javadoc-location-javax-net", "{url-javase-javadoc}"); - attributes.put("javadoc-location-javax-sql", "{url-javase-javadoc}"); - attributes.put("javadoc-location-javax-xml", "{url-javase-javadoc}"); + attributes.put("javadoc-location-java-beans", "{url-javase-javadoc}/java.desktop"); + attributes.put("javadoc-location-java-lang", "{url-javase-javadoc}/java.base"); + attributes.put("javadoc-location-java-net", "{url-javase-javadoc}/java.base"); + attributes.put("javadoc-location-java-io", "{url-javase-javadoc}/java.base"); + attributes.put("javadoc-location-java-time", "{url-javase-javadoc}/java.base"); + attributes.put("javadoc-location-java-util", "{url-javase-javadoc}/java.base"); + attributes.put("javadoc-location-javax-management", "{url-javase-javadoc}/java.management"); + attributes.put("javadoc-location-javax-net", "{url-javase-javadoc}/java.base"); + attributes.put("javadoc-location-javax-sql", "{url-javase-javadoc}/java.sql"); + attributes.put("javadoc-location-javax-xml", "{url-javase-javadoc}/java.xml"); } private void addUrlLibraryLinkAttributes(Map attributes) { diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index cd6637e6853..44569e9eec5 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1022,6 +1022,7 @@ bom { } links { site("https://www.jooq.org") + javadoc("https://www.jooq.org/javadoc/{version}", "org.jooq") docs("https://www.jooq.org/doc/{version}/manual-single-page") releaseNotes("https://github.com/jOOQ/jOOQ/releases/tag/version-{version}") } @@ -1582,6 +1583,7 @@ bom { } links { site("https://netty.io") + javadoc(version -> "https://netty.io/%s.%s/api".formatted(version.major(), version.minor()), "io.netty") } } library("OpenTelemetry", "1.43.0") { diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/build-tool-plugin/pages/other-build-systems.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/build-tool-plugin/pages/other-build-systems.adoc index 5d7e90f243a..a0a87bf24b0 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/build-tool-plugin/pages/other-build-systems.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/build-tool-plugin/pages/other-build-systems.adoc @@ -25,7 +25,7 @@ Various settings can also be configured on the repackager before it is run. When repackaging an archive, you can include references to dependency files by using the `org.springframework.boot.loader.tools.Libraries` interface. We do not provide any concrete implementations of `Libraries` here as they are usually build-system-specific. -If your archive already includes libraries, you can use `Libraries.NONE`. +If your archive already includes libraries, you can use javadoc:org.springframework.boot.loader.tools.Libraries#NONE[]. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/application.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/application.adoc index fa161f4a689..1c23f059495 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/application.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/application.adoc @@ -60,7 +60,7 @@ When reading the code, remember the following rules of thumb: [[howto.application.customize-the-environment-or-application-context]] == Customize the Environment or ApplicationContext Before It Starts -A `SpringApplication` has `ApplicationListeners` and `ApplicationContextInitializers` that are used to apply customizations to the context or environment. +A `SpringApplication` has `ApplicationListener` and `ApplicationContextInitializer` implementations that are used to apply customizations to the context or environment. Spring Boot loads a number of such customizations for use internally from `META-INF/spring.factories`. There is more than one way to register additional customizations: @@ -97,7 +97,7 @@ This is too late to configure certain properties such as `+logging.*+` and `+spr [[howto.application.context-hierarchy]] == Build an ApplicationContext Hierarchy (Adding a Parent or Root Context) -You can use the `ApplicationBuilder` class to create parent/child `ApplicationContext` hierarchies. +You can use the `SpringApplicationBuilder` class to create parent/child `ApplicationContext` hierarchies. See xref:reference:features/spring-application.adoc#features.spring-application.fluent-builder-api[] in the "`Spring Boot Features`" section for more information. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/webserver.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/webserver.adoc index b9b93481284..78037ad24d7 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/webserver.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/webserver.adoc @@ -441,7 +441,7 @@ server: filename: "/var/log/jetty-access.log" ---- -By default, logs are redirected to `System.err`. +By default, logs are redirected to javadoc:java.lang.System#err[]. For more details, see the Jetty documentation. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/endpoints.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/endpoints.adoc index f109f33ca42..454a9ab2970 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/endpoints.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/endpoints.adoc @@ -581,11 +581,11 @@ 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 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. +Spring Boot includes a number of auto-configured `HealthContributor` beans, and you can also write your own. A `HealthContributor` can be either a `HealthIndicator` or a `CompositeHealthContributor`. A `HealthIndicator` provides actual health information, including a `Status`. -A `CompositeHealthContributor` provides a composite of other `HealthContributors`. +A `CompositeHealthContributor` provides a composite of other `HealthContributor` instances. Taken together, contributors form a tree structure to represent the overall system health. By default, the final system health is derived by a `StatusAggregator`, which sorts the statuses from each `HealthIndicator` based on an ordered list of statuses. @@ -599,7 +599,7 @@ TIP: You can use the `HealthContributorRegistry` to register and unregister heal [[actuator.endpoints.health.auto-configured-health-indicators]] === Auto-configured HealthIndicators -When appropriate, Spring Boot auto-configures the `HealthIndicators` listed in the following table. +When appropriate, Spring Boot auto-configures the `HealthIndicator` beans listed in the following table. You can also enable or disable selected indicators by configuring `management.health.key.enabled`, with the `key` listed in the following table: @@ -674,9 +674,7 @@ TIP: The `ssl` `HealthIndicator` has a "warning threshold" property named config If an SSL certificate will be invalid within the time span defined by this threshold, the `HealthIndicator` will warn you but it will still return HTTP 200 to not disrupt the application. You can use this threshold to give yourself enough lead time to rotate the soon to be expired certificate. - - -Additional `HealthIndicators` are available but are not enabled by default: +Additional `HealthIndicators` beans are available but are not enabled by default: [cols="3,4,6"] |=== @@ -773,7 +771,7 @@ The following table shows the default status mappings for the built-in statuses: 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 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. +Regular `HealthContributor` instances 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`. @@ -790,7 +788,7 @@ TIP: To handle the error automatically, consider extending from `AbstractReactiv [[actuator.endpoints.health.auto-configured-reactive-health-indicators]] === Auto-configured ReactiveHealthIndicators -When appropriate, Spring Boot auto-configures the following `ReactiveHealthIndicators`: +When appropriate, Spring Boot auto-configures the following `ReactiveHealthIndicator` beans: [cols="2,4,6"] |=== diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/metrics.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/metrics.adoc index 624eabe6a3e..0e887cb5387 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/metrics.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/metrics.adoc @@ -888,8 +888,8 @@ To customize the tags when using `WebClient`, provide a `@Bean` that implements [[actuator.metrics.supported.tomcat]] === Tomcat Metrics -Auto-configuration enables the instrumentation of Tomcat only when an `MBeanRegistry` is enabled. -By default, the `MBeanRegistry` is disabled, but you can enable it by setting configprop:server.tomcat.mbeanregistry.enabled[] to `true`. +Auto-configuration enables the instrumentation of Tomcat only when an MBean `org.apache.tomcat.util.modeler.Registry` is enabled. +By default, the MBean registry is disabled, but you can enable it by setting configprop:server.tomcat.mbeanregistry.enabled[] to `true`. Tomcat metrics are published under the `tomcat.` meter name. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc index ae21503f4d9..8172d114a98 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc @@ -372,7 +372,7 @@ Furthermore, you can define a `RestClientOptions` bean to take further control o {url-spring-data-elasticsearch-site}[Spring Data Elasticsearch] ships `ReactiveElasticsearchClient` for querying Elasticsearch instances in a reactive fashion. If you have Spring Data Elasticsearch and Reactor on the classpath, Spring Boot will auto-configure and register a `ReactiveElasticsearchClient`. -The `ReactiveElasticsearchclient` uses a transport that depends upon the previously described `RestClient`. +The `ReactiveElasticsearchClient` uses a transport that depends upon the previously described `RestClient`. Therefore, the properties described previously can be used to configure the `ReactiveElasticsearchClient`. Furthermore, you can define a `RestClientOptions` bean to take further control of the behavior of the transport. @@ -409,10 +409,10 @@ You can customize the locations to look for repositories and documents by using TIP: For complete details of Spring Data Elasticsearch, see the {url-spring-data-elasticsearch-docs}[reference documentation]. -Spring Boot supports both classic and reactive Elasticsearch repositories, using the `ElasticsearchRestTemplate` or `ReactiveElasticsearchTemplate` beans. +Spring Boot supports both classic and reactive Elasticsearch repositories, using the `ElasticsearchTemplate` or `ReactiveElasticsearchTemplate` beans. Most likely those beans are auto-configured by Spring Boot given the required dependencies are present. -If you wish to use your own template for backing the Elasticsearch repositories, you can add your own `ElasticsearchRestTemplate` or `ElasticsearchOperations` `@Bean`, as long as it is named `"elasticsearchTemplate"`. +If you wish to use your own template for backing the Elasticsearch repositories, you can add your own `ElasticsearchTemplate` or `ElasticsearchOperations` `@Bean`, as long as it is named `"elasticsearchTemplate"`. Same applies to `ReactiveElasticsearchTemplate` and `ReactiveElasticsearchOperations`, with the bean name `"reactiveElasticsearchTemplate"`. You can choose to disable the repositories support with the following property: diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc index 01fc6f98db0..d0840bd2e94 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc @@ -125,7 +125,7 @@ If HikariCP is available, we always choose it. . Otherwise, if https://commons.apache.org/proper/commons-dbcp/[Commons DBCP2] is available, we use it. . If none of HikariCP, Tomcat, and DBCP2 are available and if Oracle UCP is available, we use it. -NOTE: If you use the `spring-boot-starter-jdbc` or `spring-boot-starter-data-jpa` starters, you automatically get a dependency to `HikariCP`. +NOTE: If you use the `spring-boot-starter-jdbc` or `spring-boot-starter-data-jpa` starters, you automatically get a dependency to HikariCP. You can bypass that algorithm completely and specify the connection pool to use by setting the configprop:spring.datasource.type[] property. This is especially important if you run your application in a Tomcat container, as `tomcat-jdbc` is provided by default. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc index 6ab3290e11d..67bf3090eee 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc @@ -192,7 +192,7 @@ TIP: If multiple auto-configurations have to be defined, there is no need to ord Each test can use the runner to represent a particular use case. For instance, the sample below invokes a user configuration (`UserConfiguration`) and checks that the auto-configuration backs off properly. -Invoking `run` provides a callback context that can be used with `AssertJ`. +Invoking `run` provides a callback context that can be used with AssertJ. include-code::MyServiceAutoConfigurationTests[tag=test-user-config] diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc index 2e4ca3b32dc..e56949fdb45 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc @@ -10,7 +10,7 @@ Spring Boot uses a very particular `PropertySource` order that is designed to al Later property sources can override the values defined in earlier ones. Sources are considered in the following order: -. Default properties (specified by setting `SpringApplication.setDefaultProperties`). +. Default properties (specified by setting javadoc:org.springframework.boot.SpringApplication#setDefaultProperties(java.util.Map)[]). . javadoc:{url-spring-framework-javadoc}/org.springframework.context.annotation.PropertySource[format=annotation] annotations on your `@Configuration` classes. Please note that such property sources are not added to the `Environment` until the application context is being refreshed. This is too late to configure certain properties such as `+logging.*+` and `+spring.main.*+` which are read before refresh begins. @@ -195,7 +195,7 @@ You can use this prefix with the `spring.config.location` and `spring.config.add For example, a `spring.config.import` value of `optional:file:./myconfig.properties` allows your application to start, even if the `myconfig.properties` file is missing. -If you want to ignore all `ConfigDataLocationNotFoundExceptions` and always continue to start your application, you can use the `spring.config.on-not-found` property. +If you want to ignore all `ConfigDataLocationNotFoundException` errors and always continue to start your application, you can use the `spring.config.on-not-found` property. Set the value to `ignore` using `SpringApplication.setDefaultProperties(...)` or with a system/environment variable. @@ -1084,7 +1084,7 @@ NOTE: The preceding merging rules apply to properties from all property sources, === Properties Conversion Spring Boot attempts to coerce the external application properties to the right type when it binds to the `@ConfigurationProperties` beans. -If you need custom type conversion, you can provide a `ConversionService` bean (with a bean named `conversionService`) or custom property editors (through a `CustomEditorConfigurer` bean) or custom `Converters` (with bean definitions annotated as `@ConfigurationPropertiesBinding`). +If you need custom type conversion, you can provide a `ConversionService` bean (with a bean named `conversionService`) or custom property editors (through a `CustomEditorConfigurer` bean) or custom converters (with bean definitions annotated as `@ConfigurationPropertiesBinding`). NOTE: As this bean is requested very early during the application lifecycle, make sure to limit the dependencies that your `ConversionService` is using. Typically, any dependency that you require may not be fully initialized at creation time. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/spring-application.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/spring-application.adoc index d032eac7a0e..24453e6bb5a 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/spring-application.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/spring-application.adoc @@ -2,7 +2,7 @@ = SpringApplication The `SpringApplication` class provides a convenient way to bootstrap a Spring application that is started from a `main()` method. -In many situations, you can delegate to the static `SpringApplication.run` method, as shown in the following example: +In many situations, you can delegate to the static javadoc:org.springframework.boot.SpringApplication#run(java.lang.Class,java.lang.String...)[] method, as shown in the following example: include-code::MyApplication[] @@ -28,7 +28,7 @@ TIP: To add additional logging during startup, you can override `logStartupInfo( [[features.spring-application.startup-failure]] == Startup Failure -If your application fails to start, registered `FailureAnalyzers` get a chance to provide a dedicated error message and a concrete action to fix the problem. +If your application fails to start, registered `FailureAnalyzer` beans get a chance to provide a dedicated error message and a concrete action to fix the problem. For instance, if you start a web application on port `8080` and that port is already in use, you should see something similar to the following message: [source] @@ -127,7 +127,7 @@ Inside your `banner.txt` file, you can use any key available in the `Environment TIP: The `SpringApplication.setBanner(...)` method can be used if you want to generate a banner programmatically. Use the `org.springframework.boot.Banner` interface and implement your own `printBanner()` method. -You can also use the configprop:spring.main.banner-mode[] property to determine if the banner has to be printed on `System.out` (`console`), sent to the configured logger (`log`), or not produced at all (`off`). +You can also use the configprop:spring.main.banner-mode[] property to determine if the banner has to be printed on javadoc:java.lang.System#out[] (`console`), sent to the configured logger (`log`), or not produced at all (`off`). The printed banner is registered as a singleton bean under the following name: `springBootBanner`. @@ -260,9 +260,9 @@ Application events are sent in the following order, as your application runs: . An `ApplicationContextInitializedEvent` is sent when the `ApplicationContext` is prepared and ApplicationContextInitializers have been called but before any bean definitions are loaded. . An `ApplicationPreparedEvent` is sent just before the refresh is started but after bean definitions have been loaded. . An `ApplicationStartedEvent` is sent after the context has been refreshed but before any application and command-line runners have been called. -. An `AvailabilityChangeEvent` is sent right after with `LivenessState.CORRECT` to indicate that the application is considered as live. +. An `AvailabilityChangeEvent` is sent right after with javadoc:org.springframework.boot.availability.LivenessState#CORRECT[] to indicate that the application is considered as live. . An `ApplicationReadyEvent` is sent after any xref:features/spring-application.adoc#features.spring-application.command-line-runner[application and command-line runners] have been called. -. An `AvailabilityChangeEvent` is sent right after with `ReadinessState.ACCEPTING_TRAFFIC` to indicate that the application is ready to service requests. +. An `AvailabilityChangeEvent` is sent right after with javadoc:org.springframework.boot.availability.ReadinessState#ACCEPTING_TRAFFIC[] to indicate that the application is ready to service requests. . An `ApplicationFailedEvent` is sent if there is an exception on startup. The above list only includes ``SpringApplicationEvent``s that are tied to a `SpringApplication`. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/caching.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/caching.adoc index 888b5718574..103b62f11c3 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/caching.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/caching.adoc @@ -101,7 +101,7 @@ NOTE: When a cache library offers both a native implementation and JSR-107 suppo TIP: Spring Boot has xref:io/hazelcast.adoc[general support for Hazelcast]. If a single `HazelcastInstance` is available, it is automatically reused for the `CacheManager` as well, unless the configprop:spring.cache.jcache.config[] property is specified. -There are two ways to customize the underlying `javax.cache.cacheManager`: +There are two ways to customize the underlying `javax.cache.CacheManager`: * Caches can be created on startup by setting the configprop:spring.cache.cache-names[] property. If a custom `javax.cache.configuration.Configuration` bean is defined, it is used to customize them. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/kafka.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/kafka.adoc index 2946770defe..fdbb708ff2c 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/kafka.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/kafka.adoc @@ -71,7 +71,7 @@ To use the factory bean, wire `StreamsBuilder` into your `@Bean` as shown in the include-code::MyKafkaStreamsConfiguration[] -By default, the streams managed by the `StreamBuilder` object are started automatically. +By default, the streams managed by the `StreamsBuilder` object are started automatically. You can customize this behavior using the configprop:spring.kafka.streams.auto-startup[] property. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/rsocket.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/rsocket.adoc index fa07f585ab7..de8e293e252 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/rsocket.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/rsocket.adoc @@ -36,7 +36,7 @@ The required dependencies are provided by the `spring-boot-starter-rsocket`. Spring Boot allows exposing RSocket over WebSocket from a WebFlux server, or standing up an independent RSocket server. This depends on the type of application and its configuration. -For WebFlux application (that is of type `WebApplicationType.REACTIVE`), the RSocket server will be plugged into the Web Server only if the following properties match: +For WebFlux application (that is of type javadoc:org.springframework.boot.WebApplicationType#REACTIVE[]), the RSocket server will be plugged into the Web Server only if the following properties match: [configprops,yaml] ---- diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-boot-applications.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-boot-applications.adoc index f0b4227c344..d34b032935d 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-boot-applications.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-boot-applications.adoc @@ -85,8 +85,8 @@ For example, the following is a very common code pattern for a typical Spring Bo include-code::typical/MyApplication[] -In the example above, the `main` method doesn't do anything other than delegate to `SpringApplication.run`. -It is, however, possible to have a more complex `main` method that applies customizations before calling `SpringApplication.run`. +In the example above, the `main` method doesn't do anything other than delegate to javadoc:org.springframework.boot.SpringApplication#run(java.lang.Class,java.lang.String...)[]. +It is, however, possible to have a more complex `main` method that applies customizations before calling javadoc:org.springframework.boot.SpringApplication#run(java.lang.Class,java.lang.String...)[]. For example, here is an application that changes the banner mode and sets additional profiles: @@ -95,7 +95,7 @@ include-code::custom/MyApplication[] Since customizations in the `main` method can affect the resulting `ApplicationContext`, it's possible that you might also want to use the `main` method to create the `ApplicationContext` used in your tests. By default, `@SpringBootTest` will not call your `main` method, and instead the class itself is used directly to create the `ApplicationContext` -If you want to change this behavior, you can change the `useMainMethod` attribute of `@SpringBootTest` to `UseMainMethod.ALWAYS` or `UseMainMethod.WHEN_AVAILABLE`. +If you want to change this behavior, you can change the `useMainMethod` attribute of `@SpringBootTest` to javadoc:org.springframework.boot.test.context.SpringBootTest$UseMainMethod#ALWAYS[] or javadoc:org.springframework.boot.test.context.SpringBootTest$UseMainMethod#WHEN_AVAILABLE[]. When set to `ALWAYS`, the test will fail if no `main` method can be found. When set to `WHEN_AVAILABLE` the `main` method will be used if it is available, otherwise the standard loading mechanism will be used. @@ -297,7 +297,7 @@ The following example shows a test class for Jackson: include-code::MyJsonTests[] NOTE: JSON helper classes can also be used directly in standard unit tests. -To do so, call the `initFields` method of the helper in your `@Before` method if you do not use `@JsonTest`. +To do so, call the `initFields` method of the helper in your `@BeforeEach` method if you do not use `@JsonTest`. If you use Spring Boot's AssertJ-based helpers to assert on a number value at a given JSON path, you might not be able to use `isEqualTo` depending on the type. Instead, you can use AssertJ's `satisfies` to assert that the value matches the given condition. @@ -482,7 +482,7 @@ include-code::MyDataCouchbaseTests[] == Auto-configured Data Elasticsearch Tests You can use `@DataElasticsearchTest` to test Elasticsearch applications. -By default, it configures an `ElasticsearchRestTemplate`, scans for `@Document` classes, and configures Spring Data Elasticsearch repositories. +By default, it configures an `ElasticsearchTemplate`, scans for `@Document` classes, and configures Spring Data Elasticsearch repositories. Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataElasticsearchTest` annotation is used. `@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans. (For more about using Elasticsearch with Spring Boot, see xref:data/nosql.adoc#data.nosql.elasticsearch[], earlier in this chapter.) @@ -794,7 +794,7 @@ include-code::MyRestDocsConfiguration[] === Auto-configured Spring Web Services Client Tests You can use `@WebServiceClientTest` to test applications that call web services using the Spring Web Services project. -By default, it configures a mock `WebServiceServer` bean and automatically customizes your `WebServiceTemplateBuilder`. +By default, it configures a `MockWebServiceServer` bean and automatically customizes your `WebServiceTemplateBuilder`. (For more about using Web Services with Spring Boot, see xref:io/webservices.adoc[].) diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc index 9b82a7567ee..a846830ce6a 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc @@ -30,9 +30,9 @@ include-code::MyEnvironmentTests[] [[testing.utilities.output-capture]] -== OutputCapture +== OutputCaptureExtension -`OutputCapture` is a JUnit `Extension` that you can use to capture `System.out` and `System.err` output. +`OutputCaptureExtension` is a JUnit `Extension` that you can use to capture javadoc:java.lang.System#out[] and javadoc:java.lang.System#err[] output. To use it, add `@ExtendWith(OutputCaptureExtension.class)` and inject `CapturedOutput` as an argument to your test class constructor or test method as follows: include-code::MyOutputCaptureTests[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc index 04693495b8d..92d265284aa 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/testcontainers.adoc @@ -84,7 +84,7 @@ The following service connection factories are provided in the `spring-boot-test | Containers of type `PulsarContainer` | `R2dbcConnectionDetails` -| Containers of type `ClickHouseContainer`, `MariaDBContainer`, `MSSQLServerContainer`, `MySQLContainer`, `OracleContainer`, or `PostgreSQLContainer` +| Containers of type `ClickHouseContainer`, `MariaDBContainer`, `MSSQLServerContainer`, `MySQLContainer`, javadoc:{url-testcontainers-oracle-free-javadoc}/org.testcontainers.OracleContainer[OracleContainer (free)], javadoc:{url-testcontainers-oracle-xe-javadoc}/org.testcontainers.oracle.OracleContainer[OracleContainer (XE)] or `PostgreSQLContainer` | `RabbitConnectionDetails` | Containers of type `RabbitMQContainer` diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/servlet.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/servlet.adoc index cef91069d71..61d6674e42d 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/servlet.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/servlet.adoc @@ -483,7 +483,7 @@ To avoid this limitation, the `packages` method should not be used, and endpoint For more advanced customizations, you can also register an arbitrary number of beans that implement `ResourceConfigCustomizer`. -All the registered endpoints should be `@Components` with HTTP resource annotations (`@GET` and others), as shown in the following example: +All the registered endpoints should be a `@Component` with HTTP resource annotations (`@GET` and others), as shown in the following example: include-code::MyEndpoint[] diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/spring-graphql.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/spring-graphql.adoc index cee593cf622..27543734e18 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/spring-graphql.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/spring-graphql.adoc @@ -107,8 +107,7 @@ The GraphQL WebSocket endpoint is off by default. To enable it: Spring GraphQL provides a {url-spring-graphql-docs}/transports.html#server.interception[Web Interception] model. This is quite useful for retrieving information from an HTTP request header and set it in the GraphQL context or fetching information from the same context and writing it to a response header. -With Spring Boot, you can declare a `WebInterceptor` bean to have it registered with the web transport. - +With Spring Boot, you can declare a `WebGraphQlInterceptor` bean to have it registered with the web transport. {url-spring-framework-docs}/web/webmvc-cors.html[Spring MVC] and {url-spring-framework-docs}/web/webflux-cors.html[Spring WebFlux] support CORS (Cross-Origin Resource Sharing) requests. CORS is a critical part of the web config for GraphQL applications that are accessed from browsers using different domains. diff --git a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/specification/pages/executable-jar/restrictions.adoc b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/specification/pages/executable-jar/restrictions.adoc index f0745b21d67..f5ebd8f8bae 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/antora/modules/specification/pages/executable-jar/restrictions.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/antora/modules/specification/pages/executable-jar/restrictions.adoc @@ -7,7 +7,7 @@ You need to consider the following restrictions when working with a Spring Boot [[appendix.executable-jar-zip-entry-compression]] * Zip entry compression: -The `ZipEntry` for a nested jar must be saved by using the `ZipEntry.STORED` method. +The `ZipEntry` for a nested jar must be saved by using the javadoc:java.util.zip.ZipEntry#STORED[] method. This is required so that we can seek directly to individual content within the nested jar. The content of the nested jar file itself can still be compressed, as can any other entry in the outer jar.