Skip to content

Commit 21f733b

Browse files
committed
Merge branch '2.1.x' into 2.2.x
Closes gh-22409
2 parents 97a8791 + 179d2c7 commit 21f733b

File tree

13 files changed

+59
-62
lines changed

13 files changed

+59
-62
lines changed

CONTRIBUTING.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
= Contributing to Spring Boot
22

33
Spring Boot is released under the Apache 2.0 license. If you would like to contribute
4-
something, or simply want to hack on the code this document should help you get started.
4+
something, or want to hack on the code this document should help you get started.
55

66

77

@@ -54,7 +54,7 @@ added after the original pull request but before a merge.
5454
`./mvnw io.spring.javaformat:spring-javaformat-maven-plugin:apply`.
5555
* The build includes checkstyle rules for many of our code conventions. Run
5656
`./mvnw validate` if you want to check you changes are compliant.
57-
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
57+
* Make sure all new `.java` files have a Javadoc class comment with at least an
5858
`@author` tag identifying you, and preferably at least a paragraph on what the class is
5959
for.
6060
* Add the ASF license header comment to all new `.java` files (copy from existing files

README.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
:docs: https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference
33
:github: https://github.com/spring-projects/spring-boot
44

5-
Spring Boot makes it easy to create Spring-powered, production-grade applications and
5+
Spring Boot helps you to create Spring-powered, production-grade applications and
66
services with absolute minimum fuss. It takes an opinionated view of the Spring platform
77
so that new and existing users can quickly get to the bits they need.
88

@@ -161,7 +161,7 @@ There are a number of modules in Spring Boot, here is a quick overview:
161161
The main library providing features that support the other parts of Spring Boot,
162162
these include:
163163

164-
* The `SpringApplication` class, providing static convenience methods that make it easy
164+
* The `SpringApplication` class, providing static convenience methods that can be used
165165
to write a stand-alone Spring Application. Its sole job is to create and refresh an
166166
appropriate Spring `ApplicationContext`
167167
* Embedded web applications with a choice of container (Tomcat, Jetty or Undertow)
@@ -188,14 +188,14 @@ Starters are a set of convenient dependency descriptors that you can include in
188188
your application. You get a one-stop-shop for all the Spring and related technology
189189
that you need without having to hunt through sample code and copy paste loads of
190190
dependency descriptors. For example, if you want to get started using Spring and JPA for
191-
database access just include the `spring-boot-starter-data-jpa` dependency in your
191+
database access include the `spring-boot-starter-data-jpa` dependency in your
192192
project, and you are good to go.
193193

194194

195195

196196
=== spring-boot-cli
197-
The Spring command line application compiles and runs Groovy source, making it super
198-
easy to write the absolute minimum of code to get an application running. Spring CLI
197+
The Spring command line application compiles and runs Groovy source, allowing you to
198+
write the absolute minimum of code to get an application running. Spring CLI
199199
can also watch files, automatically recompiling and restarting when they change.
200200

201201

@@ -256,7 +256,7 @@ The https://spring.io/[spring.io] site contains several guides that show how to
256256
Boot step-by-step:
257257

258258
* https://spring.io/guides/gs/spring-boot/[Building an Application with Spring Boot] is a
259-
very basic guide that shows you how to create a simple application, run it and add some
259+
very basic guide that shows you how to create an application, run it and add some
260260
management services.
261261
* https://spring.io/guides/gs/actuator-service/[Building a RESTful Web Service with Spring
262262
Boot Actuator] is a guide to creating a REST web service and also shows how the server

spring-boot-project/spring-boot-actuator/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production
88
covers the features in more detail.
99

1010
== Enabling the Actuator
11-
The simplest way to enable the features is to add a dependency to the
11+
The recommended way to enable the features is to add a dependency to the
1212
`spring-boot-starter-actuator` '`Starter`'. To add the actuator to a Maven-based project,
1313
add the following '`Starter`' dependency:
1414

spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ However, it is possible to <<configuration-metadata-additional-metadata,write pa
1414
[[configuration-metadata-format]]
1515
== Metadata Format
1616
Configuration metadata files are located inside jars under `META-INF/spring-configuration-metadata.json`.
17-
They use a simple JSON format with items categorized under either "`groups`" or "`properties`" and additional values hints categorized under "hints", as shown in the following example:
17+
They use a JSON format with items categorized under either "`groups`" or "`properties`" and additional values hints categorized under "hints", as shown in the following example:
1818

1919
[source,json,indent=0]
2020
----
@@ -762,7 +762,7 @@ This dependency ensures that the additional metadata is available when the annot
762762
The processor picks up both classes and methods that are annotated with `@ConfigurationProperties`.
763763
The Javadoc for field values within configuration classes is used to populate the `description` attribute.
764764

765-
NOTE: You should only use simple text with `@ConfigurationProperties` field Javadoc, since they are not processed before being added to the JSON.
765+
NOTE: You should only use plain text with `@ConfigurationProperties` field Javadoc, since they are not processed before being added to the JSON.
766766

767767
If the class has a single constructor with at least one parameters, one property is created per constructor parameter.
768768
Otherwise, properties are discovered through the presence of standard getters and setters with special handling for collection types (that is detected even if only a getter is present).

spring-boot-project/spring-boot-docs/src/main/asciidoc/deployment.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ It minimizes divergence between development and production environments.
7878

7979
Ideally, your application, like a Spring Boot executable jar, has everything that it needs to run packaged within it.
8080

81-
In this section, we look at what it takes to get the <<getting-started.adoc#getting-started-first-application, simple application that we developed>> in the "`Getting Started`" section up and running in the Cloud.
81+
In this section, we look at what it takes to get the <<getting-started.adoc#getting-started-first-application, application that we developed>> in the "`Getting Started`" section up and running in the Cloud.
8282

8383

8484

@@ -278,7 +278,7 @@ The options include:
278278
* AWS Container Registry
279279

280280
Each has different features and pricing models.
281-
In this document, we describe only the simplest option: AWS Elastic Beanstalk.
281+
In this document, we describe to approach using AWS Elastic Beanstalk.
282282

283283

284284

@@ -450,7 +450,7 @@ Then deploy with `mvn appengine:deploy` (if you need to authenticate first, the
450450
== Installing Spring Boot Applications
451451
In addition to running Spring Boot applications by using `java -jar`, it is also possible to make fully executable applications for Unix systems.
452452
A fully executable jar can be executed like any other executable binary or it can be <<deployment-service,registered with `init.d` or `systemd`>>.
453-
This makes it very easy to install and manage Spring Boot applications in common production environments.
453+
This helps when installing and managing Spring Boot applications in common production environments.
454454

455455
CAUTION: Fully executable jars work by embedding an extra script at the front of the file.
456456
Currently, some tools do not accept this format, so you may not always be able to use this technique.
@@ -800,7 +800,7 @@ The following environment properties are supported with the default script:
800800
| The explicit location of the jar file, in case the script is being used to launch a jar that it is not actually embedded.
801801

802802
| `DEBUG`
803-
| If not empty, sets the `-x` flag on the shell process, making it easy to see the logic in the script.
803+
| If not empty, sets the `-x` flag on the shell process, allowing you to see the logic in the script.
804804

805805
| `STOP_WAIT_TIME`
806806
| The time in seconds to wait when stopping the application before forcing a shutdown (`60` by default).

spring-boot-project/spring-boot-docs/src/main/asciidoc/getting-started.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ We then walk you through building your first Spring Boot application, discussing
1111

1212
[[getting-started-introducing-spring-boot]]
1313
== Introducing Spring Boot
14-
Spring Boot makes it easy to create stand-alone, production-grade Spring-based Applications that you can run.
14+
Spring Boot helps you to create stand-alone, production-grade Spring-based Applications that you can run.
1515
We take an opinionated view of the Spring platform and third-party libraries, so that you can get started with minimum fuss.
1616
Most Spring Boot applications need very little Spring configuration.
1717

@@ -251,7 +251,7 @@ Get SDKMAN! from https://sdkman.io and install Spring Boot by using the followin
251251
Spring Boot v{spring-boot-version}
252252
----
253253

254-
If you develop features for the CLI and want easy access to the version you built, use the following commands:
254+
If you develop features for the CLI and want access to the version you built, use the following commands:
255255

256256
[indent=0,subs="verbatim,quotes,attributes"]
257257
----
@@ -415,7 +415,7 @@ If you manually installed the CLI, follow the <<getting-started-manual-cli-insta
415415

416416
[[getting-started-first-application]]
417417
== Developing Your First Spring Boot Application
418-
This section describes how to develop a simple "`Hello World!`" web application that highlights some of Spring Boot's key features.
418+
This section describes how to develop a small "`Hello World!`" web application that highlights some of Spring Boot's key features.
419419
We use Maven to build this project, since most IDEs support it.
420420

421421
[TIP]
@@ -625,7 +625,7 @@ Spring Boot still does its best to auto-configure your application.
625625
[[getting-started-first-application-main-method]]
626626
==== The "`main`" Method
627627
The final part of our application is the `main` method.
628-
This is just a standard method that follows the Java convention for an application entry point.
628+
This is a standard method that follows the Java convention for an application entry point.
629629
Our main method delegates to Spring Boot's `SpringApplication` class by calling `run`.
630630
`SpringApplication` bootstraps our application, starting Spring, which, in turn, starts the auto-configured Tomcat web server.
631631
We need to pass `Example.class` as an argument to the `run` method to tell `SpringApplication` which is the primary Spring component.

spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The following example registers `ProjectConstraintViolationFailureAnalyzer`:
3838
com.example.ProjectConstraintViolationFailureAnalyzer
3939
----
4040

41-
NOTE: If you need access to the `BeanFactory` or the `Environment`, your `FailureAnalyzer` can simply implement `BeanFactoryAware` or `EnvironmentAware` respectively.
41+
NOTE: If you need access to the `BeanFactory` or the `Environment`, your `FailureAnalyzer` can implement `BeanFactoryAware` or `EnvironmentAware` respectively.
4242

4343

4444

@@ -415,7 +415,7 @@ Many Spring Boot starters include default embedded containers.
415415
* For reactive stack applications, the `spring-boot-starter-webflux` includes Reactor Netty by including `spring-boot-starter-reactor-netty`, but you can use `spring-boot-starter-tomcat`, `spring-boot-starter-jetty`, or `spring-boot-starter-undertow` instead.
416416

417417
When switching to a different HTTP server, you need to exclude the default dependencies in addition to including the one you need.
418-
Spring Boot provides separate starters for HTTP servers to help make this process as easy as possible.
418+
To help with this process, Spring Boot provides a separate starter for each of the supported HTTP servers.
419419

420420
The following Maven example shows how to exclude Tomcat and include Jetty for Spring MVC:
421421

@@ -1029,7 +1029,7 @@ The `ObjectMapper` (or `XmlMapper` for Jackson XML converter) instance (created
10291029
Spring Boot also has some features to make it easier to customize this behavior.
10301030

10311031
You can configure the `ObjectMapper` and `XmlMapper` instances by using the environment.
1032-
Jackson provides an extensive suite of simple on/off features that can be used to configure various aspects of its processing.
1032+
Jackson provides an extensive suite of on/off features that can be used to configure various aspects of its processing.
10331033
These features are described in six enums (in Jackson) that map onto properties in the environment:
10341034

10351035
|===
@@ -1290,7 +1290,7 @@ This ensures efficient sharing of resources for the server receiving requests an
12901290
== Logging
12911291
Spring Boot has no mandatory logging dependency, except for the Commons Logging API, which is typically provided by Spring Framework's `spring-jcl` module.
12921292
To use https://logback.qos.ch[Logback], you need to include it and `spring-jcl` on the classpath.
1293-
The simplest way to do that is through the starters, which all depend on `spring-boot-starter-logging`.
1293+
The recommended way to do that is through the starters, which all depend on `spring-boot-starter-logging`.
12941294
For a web application, you need only `spring-boot-starter-web`, since it depends transitively on the logging starter.
12951295
If you use Maven, the following dependency adds logging for you:
12961296

@@ -1405,7 +1405,7 @@ Spring Boot supports https://logging.apache.org/log4j/2.x/[Log4j 2] for logging
14051405
If you use the starters for assembling dependencies, you have to exclude Logback and then include log4j 2 instead.
14061406
If you do not use the starters, you need to provide (at least) `spring-jcl` in addition to Log4j 2.
14071407

1408-
The simplest path is probably through the starters, even though it requires some jiggling with excludes.
1408+
The recommended path is through the starters, even though it requires some jiggling with excludes.
14091409
The following example shows how to set up the starters in Maven:
14101410

14111411
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
@@ -1739,8 +1739,7 @@ See {spring-boot-autoconfigure-module-code}/orm/jpa/HibernateJpaAutoConfiguratio
17391739
Hibernate {hibernate-docs}#caching[second-level cache] can be configured for a range of cache providers.
17401740
Rather than configuring Hibernate to lookup the cache provider again, it is better to provide the one that is available in the context whenever possible.
17411741

1742-
If you're using JCache, this is pretty easy.
1743-
First, make sure that `org.hibernate:hibernate-jcache` is available on the classpath.
1742+
To do this with JCache, first make sure that `org.hibernate:hibernate-jcache` is available on the classpath.
17441743
Then, add a `HibernatePropertiesCustomizer` bean as shown in the following example:
17451744

17461745
[source,java,indent=0]
@@ -1771,10 +1770,9 @@ Spring Boot auto-configuration switches off its entity manager in the presence o
17711770

17721771
[[howto-use-two-entity-managers]]
17731772
=== Use Two EntityManagers
1774-
Even if the default `EntityManagerFactory` works fine, you need to define a new one.
1775-
Otherwise, the presence of the second bean of that type switches off the default.
1776-
To make it easy to do, you can use the convenient `EntityManagerBuilder` provided by Spring Boot.
1777-
Alternatively, you can just the `LocalContainerEntityManagerFactoryBean` directly from Spring ORM, as shown in the following example:
1773+
Even if the default `EntityManagerFactory` works fine, you need to define a new one, otherwise the presence of the second bean of that type switches off the default.
1774+
You can use the `EntityManagerBuilder` provided by Spring Boot to help you to create one.
1775+
Alternatively, you can use the `LocalContainerEntityManagerFactoryBean` directly from Spring ORM, as shown in the following example:
17781776

17791777
[source,java,indent=0,subs="verbatim,quotes,attributes"]
17801778
----
@@ -2216,7 +2214,7 @@ Overriding the error page with your own depends on the templating technology tha
22162214
For example, if you use Thymeleaf, you can add an `error.html` template.
22172215
If you use FreeMarker, you can add an `error.ftlh` template.
22182216
In general, you need a `View` that resolves with a name of `error` or a `@Controller` that handles the `/error` path.
2219-
Unless you replaced some of the default configuration, you should find a `BeanNameViewResolver` in your `ApplicationContext`, so a `@Bean` named `error` would be a simple way of doing that.
2217+
Unless you replaced some of the default configuration, you should find a `BeanNameViewResolver` in your `ApplicationContext`, so a `@Bean` named `error` would be one way of doing that.
22202218
See {spring-boot-autoconfigure-module-code}/web/servlet/error/ErrorMvcAutoConfiguration.java[`ErrorMvcAutoConfiguration`] for more options.
22212219

22222220
See also the section on "`<<spring-boot-features.adoc#boot-features-error-handling, Error Handling>>`" for details of how to register handlers in the servlet container.
@@ -2774,8 +2772,7 @@ This means that, in addition to being deployable to a servlet container, you can
27742772

27752773
[[howto-convert-an-existing-application-to-spring-boot]]
27762774
=== Convert an Existing Application to Spring Boot
2777-
For a non-web application, it should be easy to convert an existing Spring application to a Spring Boot application.
2778-
To do so, throw away the code that creates your `ApplicationContext` and replace it with calls to `SpringApplication` or `SpringApplicationBuilder`.
2775+
To convert an existing non-web Spring application to a Spring Boot application, replace the code that creates your `ApplicationContext` and replace it with calls to `SpringApplication` or `SpringApplicationBuilder`.
27792776
Spring MVC web applications are generally amenable to first creating a deployable war application and then migrating it later to an executable war or jar.
27802777
See the https://spring.io/guides/gs/convert-jar-to-war/[Getting Started Guide on Converting a jar to a war].
27812778

@@ -2810,7 +2807,7 @@ If you have other features in your application (for instance, using other servle
28102807
* A `@Bean` of type `Servlet` or `ServletRegistrationBean` installs that bean in the container as if it were a `<servlet/>` and `<servlet-mapping/>` in `web.xml`.
28112808
* A `@Bean` of type `Filter` or `FilterRegistrationBean` behaves similarly (as a `<filter/>` and `<filter-mapping/>`).
28122809
* An `ApplicationContext` in an XML file can be added through an `@ImportResource` in your `Application`.
2813-
Alternatively, simple cases where annotation configuration is heavily used already can be recreated in a few lines as `@Bean` definitions.
2810+
Alternatively, cases where annotation configuration is heavily used already can be recreated in a few lines as `@Bean` definitions.
28142811

28152812
Once the war file is working, you can make it executable by adding a `main` method to your `Application`, as shown in the following example:
28162813

@@ -2914,7 +2911,7 @@ You can do so by adding a `WEB-INF/weblogic.xml` file with the following content
29142911
=== Use Jedis Instead of Lettuce
29152912
By default, the Spring Boot starter (`spring-boot-starter-data-redis`) uses https://github.com/lettuce-io/lettuce-core/[Lettuce].
29162913
You need to exclude that dependency and include the https://github.com/xetorthio/jedis/[Jedis] one instead.
2917-
Spring Boot manages these dependencies to help make this process as easy as possible.
2914+
Spring Boot manages both of these dependencies so you can switch to Jedis without specifying a version.
29182915

29192916
The following example shows how to do so in Maven:
29202917

spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Auditing, health, and metrics gathering can also be automatically applied to you
1111
[[production-ready-enabling]]
1212
== Enabling Production-ready Features
1313
The {spring-boot-code}/spring-boot-project/spring-boot-actuator[`spring-boot-actuator`] module provides all of Spring Boot's production-ready features.
14-
The simplest way to enable the features is to add a dependency to the `spring-boot-starter-actuator` '`Starter`'.
14+
The recommended way to enable the features is to add a dependency on the `spring-boot-starter-actuator` '`Starter`'.
1515

1616
.Definition of Actuator
1717
****
@@ -2009,7 +2009,7 @@ You can also add any number of `tag=KEY:VALUE` query parameters to the end of th
20092009
====
20102010
The reported measurements are the _sum_ of the statistics of all meters matching the meter name and any tags that have been applied.
20112011
So in the example above, the returned "Value" statistic is the sum of the maximum memory footprints of "Code Cache", "Compressed Class Space", and "Metaspace" areas of the heap.
2012-
If you just wanted to see the maximum size for the "Metaspace", you could add an additional `tag=id:Metaspace`, i.e. `/actuator/metrics/jvm.memory.max?tag=area:nonheap&tag=id:Metaspace`.
2012+
If you only wanted to see the maximum size for the "Metaspace", you could add an additional `tag=id:Metaspace`, i.e. `/actuator/metrics/jvm.memory.max?tag=area:nonheap&tag=id:Metaspace`.
20132013
====
20142014

20152015

0 commit comments

Comments
 (0)