Skip to content

Commit c479c56

Browse files
committed
Merge branch '3.2.x'
Closes gh-40942
2 parents 8f1166f + 3b09791 commit c479c56

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
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
@@ -44,7 +44,7 @@ When reading the code, remember the following rules of thumb:
4444

4545
* Look for classes called `+*AutoConfiguration+` and read their sources.
4646
Pay special attention to the `+@Conditional*+` annotations to find out what features they enable and when.
47-
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.
47+
Add `--debug` to the command line or the System property `-Ddebug` to get a log on the console of all the auto-configuration decisions that were made in your app.
4848
In a running application with actuator enabled, look at the `conditions` endpoint (`/actuator/conditions` or the JMX equivalent) for the same information.
4949
* 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.
5050
The `@ConfigurationProperties` annotation has a `name` attribute that acts as a prefix to external properties.
@@ -109,5 +109,5 @@ Not all Spring applications have to be web applications (or web services).
109109
If you want to execute some code in a `main` method but also bootstrap a Spring application to set up the infrastructure to use, you can use the `SpringApplication` features of Spring Boot.
110110
A `SpringApplication` changes its `ApplicationContext` class, depending on whether it thinks it needs a web application or not.
111111
The first thing you can do to help it is to leave server-related dependencies (such as the servlet API) off the classpath.
112-
If you cannot do that (for example, you run two applications from the same code base) then you can explicitly call `setWebApplicationType(WebApplicationType.NONE)` on your `SpringApplication` instance or set the `applicationContextClass` property (through the Java API or with external properties).
112+
If you cannot do that (for example, if you run two applications from the same code base) then you can explicitly call `setWebApplicationType(WebApplicationType.NONE)` on your `SpringApplication` instance or set the `applicationContextClass` property (through the Java API or with external properties).
113113
Application code that you want to run as your business logic can be implemented as a `CommandLineRunner` and dropped into the context as a `@Bean` definition.

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The following example shows how to define a data source in a bean:
1717

1818
include-code::custom/MyDataSourceConfiguration[]
1919

20-
The following example shows how to define a data source by setting properties:
20+
The following example shows how to define a data source by setting its properties:
2121

2222
[configprops%novalidate,yaml]
2323
----
@@ -31,7 +31,7 @@ app:
3131
Assuming that `SomeDataSource` has regular JavaBean properties for the URL, the username, and the pool size, these settings are bound automatically before the `DataSource` is made available to other components.
3232

3333
Spring Boot also provides a utility builder class, called `DataSourceBuilder`, that can be used to create one of the standard data sources (if it is on the classpath).
34-
The builder can detect the one to use based on what is available on the classpath.
34+
The builder can detect which one to use based on what is available on the classpath.
3535
It also auto-detects the driver based on the JDBC URL.
3636

3737
The following example shows how to create a data source by using a `DataSourceBuilder`:
@@ -72,7 +72,7 @@ app:
7272
You can fix that by forcing the connection pool to use and return a dedicated implementation rather than `DataSource`.
7373
You cannot change the implementation at runtime, but the list of options will be explicit.
7474

75-
The following example shows how create a `HikariDataSource` with `DataSourceBuilder`:
75+
The following example shows how to create a `HikariDataSource` with `DataSourceBuilder`:
7676

7777
include-code::simple/MyDataSourceConfiguration[]
7878

@@ -110,7 +110,7 @@ See "`xref:reference:data/sql.adoc#data.sql.datasource[Configure a DataSource]`"
110110
[[howto.data-access.configure-two-datasources]]
111111
== Configure Two DataSources
112112

113-
If you need to configure multiple data sources, you can apply the same tricks that are described in the previous section.
113+
If you need to configure multiple data sources, you can apply the same tricks that were described in the previous section.
114114
You must, however, mark one of the `DataSource` instances as `@Primary`, because various auto-configurations down the road expect to be able to get one by type.
115115

116116
If you create your own `DataSource`, the auto-configuration backs off.
@@ -225,7 +225,7 @@ If you use other forms, such as `batchSize` or `batch-size`, Hibernate will not
225225
====
226226

227227
TIP: If you need to apply advanced customization to Hibernate properties, consider registering a `HibernatePropertiesCustomizer` bean that will be invoked prior to creating the `EntityManagerFactory`.
228-
This takes precedence to anything that is applied by the auto-configuration.
228+
This takes precedence over anything that is applied by the auto-configuration.
229229

230230

231231

@@ -311,7 +311,7 @@ It scans entities located in the same package as `Order`.
311311
It is possible to map additional JPA properties using the `app.first.jpa` namespace.
312312

313313
NOTE: When you create a bean for `LocalContainerEntityManagerFactoryBean` yourself, any customization that was applied during the creation of the auto-configured `LocalContainerEntityManagerFactoryBean` is lost.
314-
For example, in case of Hibernate, any properties under the `spring.jpa.hibernate` prefix will not be automatically applied to your `LocalContainerEntityManagerFactoryBean`.
314+
For example, in the case of Hibernate, any properties under the `spring.jpa.hibernate` prefix will not be automatically applied to your `LocalContainerEntityManagerFactoryBean`.
315315
If you were relying on these properties for configuring things like the naming strategy or the DDL mode, you will need to explicitly configure that when creating the `LocalContainerEntityManagerFactoryBean` bean.
316316

317317
You should provide a similar configuration for any additional data sources for which you need JPA access.
@@ -379,7 +379,7 @@ If you need to specify an order, make sure it is higher than 0.
379379

380380
If you want to configure a component that JPA uses, then you need to ensure that the component is initialized before JPA.
381381
When the component is auto-configured, Spring Boot takes care of this for you.
382-
For example, when Flyway is auto-configured, Hibernate is configured to depend upon Flyway so that Flyway has a chance to initialize the database before Hibernate tries to use it.
382+
For example, when Flyway is auto-configured, Hibernate is configured to depend on Flyway so that Flyway has a chance to initialize the database before Hibernate tries to use it.
383383

384384
If you are configuring a component yourself, you can use an `EntityManagerFactoryDependsOnPostProcessor` subclass as a convenient way of setting up the necessary dependencies.
385385
For example, if you use Hibernate Search with Elasticsearch as its index manager, any `EntityManagerFactory` beans must be configured to depend on the `elasticsearchClient` bean, as shown in the following example:

spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/properties-and-configuration.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This is possible in both Maven and Gradle.
1616
[[howto.properties-and-configuration.expand-properties.maven]]
1717
=== Automatic Property Expansion Using Maven
1818

19-
You can automatically expand properties from the Maven project by using resource filtering.
19+
You can automatically expand properties in the Maven project by using resource filtering.
2020
If you use the `spring-boot-starter-parent`, you can then refer to your Maven '`project properties`' with `@..@` placeholders, as shown in the following example:
2121

2222
[configprops%novalidate,yaml]
@@ -131,7 +131,7 @@ spring:
131131
banner-mode: "console"
132132
----
133133

134-
The actual application will show the banner (as overridden by configuration) and uses three sources for the `ApplicationContext`.
134+
The actual application will show the banner (as overridden by configuration) and use three sources for the `ApplicationContext`.
135135
The application sources are:
136136

137137
. `MyApplication` (from the code)
@@ -152,7 +152,7 @@ You can also provide the following System properties (or environment variables)
152152
A separate `Environment` property source is set up for this document and it can be overridden by system properties, environment variables, or the command line.
153153

154154
No matter what you set in the environment, Spring Boot always loads `application.properties` as described above.
155-
By default, if YAML is used, then files with the '`.yaml`' and '`.yml`' extension are also added to the list.
155+
By default, if YAML is used, then files with the '`.yaml`' and '`.yml`' extensions are also added to the list.
156156

157157
TIP: If you want detailed information about the files that are being loaded you can xref:reference:features/logging.adoc#features.logging.log-levels[set the logging level] of `org.springframework.boot.context.config` to `trace`.
158158

@@ -174,7 +174,7 @@ TIP: If you inherit from the `spring-boot-starter-parent` POM, the default filte
174174
If you have enabled Maven filtering for the `application.properties` directly, you may want to also change the default filter token to use https://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters[other delimiters].
175175

176176
NOTE: In this specific case, the port binding works in a PaaS environment such as Heroku or Cloud Foundry.
177-
In those two platforms, the `PORT` environment variable is set automatically and Spring can bind to capitalized synonyms for `Environment` properties.
177+
On those two platforms, the `PORT` environment variable is set automatically and Spring can bind to capitalized synonyms for `Environment` properties.
178178

179179

180180

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ It has some useful methods to access the default and user-enhanced message conve
140140

141141
As in normal MVC usage, any `WebMvcConfigurer` beans that you provide can also contribute converters by overriding the `configureMessageConverters` method.
142142
However, unlike with normal MVC, you can supply only additional converters that you need (because Spring Boot uses the same mechanism to contribute its defaults).
143-
Finally, if you opt out of the Spring Boot default MVC configuration by providing your own `@EnableWebMvc` configuration, you can take control completely and do everything manually by using `getMessageConverters` from `WebMvcConfigurationSupport`.
143+
Finally, if you opt out of the default Spring Boot MVC configuration by providing your own `@EnableWebMvc` configuration, you can take control completely and do everything manually by using `getMessageConverters` from `WebMvcConfigurationSupport`.
144144

145145
See the {code-spring-boot-autoconfigure-src}/web/servlet/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`] source code for more details.
146146

@@ -158,7 +158,7 @@ The multipart support is helpful when you want to receive multipart encoded file
158158

159159
See the {code-spring-boot-autoconfigure-src}/web/servlet/MultipartAutoConfiguration.java[`MultipartAutoConfiguration`] source for more details.
160160

161-
NOTE: It is recommended to use the container's built-in support for multipart uploads rather than introducing an additional dependency such as Apache Commons File Upload.
161+
NOTE: It is recommended to use the container's built-in support for multipart uploads rather than introduce an additional dependency such as Apache Commons File Upload.
162162

163163

164164

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ include-code::MySecurityConfiguration[]
4040

4141
include-code::MyDatasourceConfiguration[]
4242

43-
Having a single configuration class can be inefficient when beans of a certain domain need to be included in slice tests.
43+
Having a single configuration class can be inefficient when beans from a certain domain need to be included in slice tests.
4444
Instead, structuring the application's configuration as multiple granular classes with beans for a specific domain can enable importing them only for specific slice tests.
4545

0 commit comments

Comments
 (0)