Skip to content

Commit 47722af

Browse files
committed
Polish documentation
Cleanup and polish some areas of the documentation.
1 parent 127b140 commit 47722af

File tree

14 files changed

+27
-28
lines changed

14 files changed

+27
-28
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/application.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ When reading the code, remember the following rules of thumb:
6060
[[howto.application.customize-the-environment-or-application-context]]
6161
== Customize the Environment or ApplicationContext Before It Starts
6262

63-
A `SpringApplication` has `ApplicationListeners` and `ApplicationContextInitializers` that are used to apply customizations to the context or environment.
63+
A `SpringApplication` has `ApplicationListener` and `ApplicationContextInitializer` implementations that are used to apply customizations to the context or environment.
6464
Spring Boot loads a number of such customizations for use internally from `META-INF/spring.factories`.
6565
There is more than one way to register additional customizations:
6666

@@ -97,7 +97,7 @@ This is too late to configure certain properties such as `+logging.*+` and `+spr
9797
[[howto.application.context-hierarchy]]
9898
== Build an ApplicationContext Hierarchy (Adding a Parent or Root Context)
9999

100-
You can use the `ApplicationBuilder` class to create parent/child `ApplicationContext` hierarchies.
100+
You can use the `SpringApplicationBuilder` class to create parent/child `ApplicationContext` hierarchies.
101101
See xref:reference:features/spring-application.adoc#features.spring-application.fluent-builder-api[] in the "`Spring Boot Features`" section for more information.
102102

103103

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/endpoints.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -566,11 +566,11 @@ You can configure the roles by using the configprop:management.endpoint.health.r
566566
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.
567567

568568
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`).
569-
Spring Boot includes a number of auto-configured `HealthContributors`, and you can also write your own.
569+
Spring Boot includes a number of auto-configured `HealthContributor` beans, and you can also write your own.
570570

571571
A `HealthContributor` can be either a `HealthIndicator` or a `CompositeHealthContributor`.
572572
A `HealthIndicator` provides actual health information, including a `Status`.
573-
A `CompositeHealthContributor` provides a composite of other `HealthContributors`.
573+
A `CompositeHealthContributor` provides a composite of other `HealthContributor` instances.
574574
Taken together, contributors form a tree structure to represent the overall system health.
575575

576576
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.
@@ -584,7 +584,7 @@ TIP: You can use the `HealthContributorRegistry` to register and unregister heal
584584
[[actuator.endpoints.health.auto-configured-health-indicators]]
585585
=== Auto-configured HealthIndicators
586586

587-
When appropriate, Spring Boot auto-configures the `HealthIndicators` listed in the following table.
587+
When appropriate, Spring Boot auto-configures the `HealthIndicator` beans listed in the following table.
588588
You can also enable or disable selected indicators by configuring `management.health.key.enabled`,
589589
with the `key` listed in the following table:
590590

@@ -655,7 +655,7 @@ with the `key` listed in the following table:
655655

656656
TIP: You can disable them all by setting the configprop:management.health.defaults.enabled[] property.
657657

658-
Additional `HealthIndicators` are available but are not enabled by default:
658+
Additional `HealthIndicator` beans are available, but are not enabled by default:
659659

660660
[cols="3,4,6"]
661661
|===
@@ -752,7 +752,7 @@ The following table shows the default status mappings for the built-in statuses:
752752

753753
For reactive applications, such as those that use Spring WebFlux, `ReactiveHealthContributor` provides a non-blocking contract for getting application health.
754754
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`).
755-
Regular `HealthContributors` that do not check against a reactive API are executed on the elastic scheduler.
755+
Regular `HealthContributor` instances that do not check against a reactive API are executed on the elastic scheduler.
756756

757757
TIP: In a reactive application, you should use the `ReactiveHealthContributorRegistry` to register and unregister health indicators at runtime.
758758
If you need to register a regular `HealthContributor`, you should wrap it with `ReactiveHealthContributor#adapt`.
@@ -769,7 +769,7 @@ TIP: To handle the error automatically, consider extending from `AbstractReactiv
769769
[[actuator.endpoints.health.auto-configured-reactive-health-indicators]]
770770
=== Auto-configured ReactiveHealthIndicators
771771

772-
When appropriate, Spring Boot auto-configures the following `ReactiveHealthIndicators`:
772+
When appropriate, Spring Boot auto-configures the following `ReactiveHealthIndicator` beans:
773773

774774
[cols="2,4,6"]
775775
|===

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/metrics.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,8 @@ To customize the tags when using `WebClient`, provide a `@Bean` that implements
888888
[[actuator.metrics.supported.tomcat]]
889889
=== Tomcat Metrics
890890

891-
Auto-configuration enables the instrumentation of Tomcat only when an `MBeanRegistry` is enabled.
892-
By default, the `MBeanRegistry` is disabled, but you can enable it by setting configprop:server.tomcat.mbeanregistry.enabled[] to `true`.
891+
Auto-configuration enables the instrumentation of Tomcat only when an MBean `org.apache.tomcat.util.modeler.Registry` is enabled.
892+
By default, the MBean registry is disabled, but you can enable it by setting configprop:server.tomcat.mbeanregistry.enabled[] to `true`.
893893

894894
Tomcat metrics are published under the `tomcat.` meter name.
895895

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ Furthermore, you can define a `RestClientOptions` bean to take further control o
372372
{url-spring-data-elasticsearch-site}[Spring Data Elasticsearch] ships `ReactiveElasticsearchClient` for querying Elasticsearch instances in a reactive fashion.
373373
If you have Spring Data Elasticsearch and Reactor on the classpath, Spring Boot will auto-configure and register a `ReactiveElasticsearchClient`.
374374

375-
The `ReactiveElasticsearchclient` uses a transport that depends upon the previously described `RestClient`.
375+
The `ReactiveElasticsearchClient` uses a transport that depends upon the previously described `RestClient`.
376376
Therefore, the properties described previously can be used to configure the `ReactiveElasticsearchClient`.
377377
Furthermore, you can define a `RestClientOptions` bean to take further control of the behavior of the transport.
378378

@@ -409,10 +409,10 @@ You can customize the locations to look for repositories and documents by using
409409

410410
TIP: For complete details of Spring Data Elasticsearch, see the {url-spring-data-elasticsearch-docs}[reference documentation].
411411

412-
Spring Boot supports both classic and reactive Elasticsearch repositories, using the `ElasticsearchRestTemplate` or `ReactiveElasticsearchTemplate` beans.
412+
Spring Boot supports both classic and reactive Elasticsearch repositories, using the `ElasticsearchTemplate` or `ReactiveElasticsearchTemplate` beans.
413413
Most likely those beans are auto-configured by Spring Boot given the required dependencies are present.
414414

415-
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"`.
415+
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"`.
416416
Same applies to `ReactiveElasticsearchTemplate` and `ReactiveElasticsearchOperations`, with the bean name `"reactiveElasticsearchTemplate"`.
417417

418418
You can choose to disable the repositories support with the following property:

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/data/sql.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ If HikariCP is available, we always choose it.
125125
. Otherwise, if https://commons.apache.org/proper/commons-dbcp/[Commons DBCP2] is available, we use it.
126126
. If none of HikariCP, Tomcat, and DBCP2 are available and if Oracle UCP is available, we use it.
127127

128-
NOTE: If you use the `spring-boot-starter-jdbc` or `spring-boot-starter-data-jpa` starters, you automatically get a dependency to `HikariCP`.
128+
NOTE: If you use the `spring-boot-starter-jdbc` or `spring-boot-starter-data-jpa` starters, you automatically get a dependency to HikariCP.
129129

130130
You can bypass that algorithm completely and specify the connection pool to use by setting the configprop:spring.datasource.type[] property.
131131
This is especially important if you run your application in a Tomcat container, as `tomcat-jdbc` is provided by default.

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ TIP: If multiple auto-configurations have to be defined, there is no need to ord
172172

173173
Each test can use the runner to represent a particular use case.
174174
For instance, the sample below invokes a user configuration (`UserConfiguration`) and checks that the auto-configuration backs off properly.
175-
Invoking `run` provides a callback context that can be used with `AssertJ`.
175+
Invoking `run` provides a callback context that can be used with AssertJ.
176176

177177
include-code::MyServiceAutoConfigurationTests[tag=test-user-config]
178178

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/external-config.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ You can use this prefix with the `spring.config.location` and `spring.config.add
195195

196196
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.
197197

198-
If you want to ignore all `ConfigDataLocationNotFoundExceptions` and always continue to start your application, you can use the `spring.config.on-not-found` property.
198+
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.
199199
Set the value to `ignore` using `SpringApplication.setDefaultProperties(...)` or with a system/environment variable.
200200

201201

@@ -1082,7 +1082,7 @@ NOTE: The preceding merging rules apply to properties from all property sources,
10821082
=== Properties Conversion
10831083

10841084
Spring Boot attempts to coerce the external application properties to the right type when it binds to the `@ConfigurationProperties` beans.
1085-
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`).
1085+
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`).
10861086

10871087
NOTE: As this bean is requested very early during the application lifecycle, make sure to limit the dependencies that your `ConversionService` is using.
10881088
Typically, any dependency that you require may not be fully initialized at creation time.

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/spring-application.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ TIP: To add additional logging during startup, you can override `logStartupInfo(
2828
[[features.spring-application.startup-failure]]
2929
== Startup Failure
3030

31-
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.
31+
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.
3232
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:
3333

3434
[source]

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/caching.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ NOTE: When a cache library offers both a native implementation and JSR-107 suppo
101101
TIP: Spring Boot has xref:io/hazelcast.adoc[general support for Hazelcast].
102102
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.
103103

104-
There are two ways to customize the underlying `javax.cache.cacheManager`:
104+
There are two ways to customize the underlying `javax.cache.CacheManager`:
105105

106106
* Caches can be created on startup by setting the configprop:spring.cache.cache-names[] property.
107107
If a custom `javax.cache.configuration.Configuration` bean is defined, it is used to customize them.

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/messaging/kafka.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ To use the factory bean, wire `StreamsBuilder` into your `@Bean` as shown in the
7171

7272
include-code::MyKafkaStreamsConfiguration[]
7373

74-
By default, the streams managed by the `StreamBuilder` object are started automatically.
74+
By default, the streams managed by the `StreamsBuilder` object are started automatically.
7575
You can customize this behavior using the configprop:spring.kafka.streams.auto-startup[] property.
7676

7777

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/spring-boot-applications.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ The following example shows a test class for Jackson:
319319
include-code::MyJsonTests[]
320320

321321
NOTE: JSON helper classes can also be used directly in standard unit tests.
322-
To do so, call the `initFields` method of the helper in your `@Before` method if you do not use `@JsonTest`.
322+
To do so, call the `initFields` method of the helper in your `@BeforeEach` method if you do not use `@JsonTest`.
323323

324324
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.
325325
Instead, you can use AssertJ's `satisfies` to assert that the value matches the given condition.
@@ -503,7 +503,7 @@ include-code::MyDataCouchbaseTests[]
503503
== Auto-configured Data Elasticsearch Tests
504504

505505
You can use `@DataElasticsearchTest` to test Elasticsearch applications.
506-
By default, it configures an `ElasticsearchRestTemplate`, scans for `@Document` classes, and configures Spring Data Elasticsearch repositories.
506+
By default, it configures an `ElasticsearchTemplate`, scans for `@Document` classes, and configures Spring Data Elasticsearch repositories.
507507
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataElasticsearchTest` annotation is used.
508508
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
509509
(For more about using Elasticsearch with Spring Boot, see xref:data/nosql.adoc#data.nosql.elasticsearch[], earlier in this chapter.)
@@ -809,7 +809,7 @@ include-code::MyRestDocsConfiguration[]
809809
=== Auto-configured Spring Web Services Client Tests
810810

811811
You can use `@WebServiceClientTest` to test applications that call web services using the Spring Web Services project.
812-
By default, it configures a mock `WebServiceServer` bean and automatically customizes your `WebServiceTemplateBuilder`.
812+
By default, it configures a `MockWebServiceServer` bean and automatically customizes your `WebServiceTemplateBuilder`.
813813
(For more about using Web Services with Spring Boot, see xref:io/webservices.adoc[].)
814814

815815

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/testing/test-utilities.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ include-code::MyEnvironmentTests[]
3030

3131

3232
[[testing.utilities.output-capture]]
33-
== OutputCapture
33+
== OutputCaptureExtension
3434

35-
`OutputCapture` is a JUnit `Extension` that you can use to capture `System.out` and `System.err` output.
35+
`OutputCaptureExtension` is a JUnit `Extension` that you can use to capture `System.out` and `System.err` output.
3636
To use it, add `@ExtendWith(OutputCaptureExtension.class)` and inject `CapturedOutput` as an argument to your test class constructor or test method as follows:
3737

3838
include-code::MyOutputCaptureTests[]

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/servlet.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ To avoid this limitation, the `packages` method should not be used, and endpoint
486486

487487
For more advanced customizations, you can also register an arbitrary number of beans that implement `ResourceConfigCustomizer`.
488488

489-
All the registered endpoints should be `@Components` with HTTP resource annotations (`@GET` and others), as shown in the following example:
489+
All the registered endpoints should be a `@Component` with HTTP resource annotations (`@GET` and others), as shown in the following example:
490490

491491
include-code::MyEndpoint[]
492492

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/web/spring-graphql.adoc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,7 @@ The GraphQL WebSocket endpoint is off by default. To enable it:
107107

108108
Spring GraphQL provides a {url-spring-graphql-docs}/transports.html#server.interception[Web Interception] model.
109109
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.
110-
With Spring Boot, you can declare a `WebInterceptor` bean to have it registered with the web transport.
111-
110+
With Spring Boot, you can declare a `WebGraphQlInterceptor` bean to have it registered with the web transport.
112111

113112
{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.
114113
CORS is a critical part of the web config for GraphQL applications that are accessed from browsers using different domains.

0 commit comments

Comments
 (0)