Skip to content

Commit 179d2c7

Browse files
committed
Avoid trivialising what the reader's learning about
Closes gh-22408
1 parent 4a0031a commit 179d2c7

File tree

16 files changed

+64
-67
lines changed

16 files changed

+64
-67
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

@@ -55,7 +55,7 @@ added after the original pull request but before a merge.
5555
`./mvnw io.spring.javaformat:spring-javaformat-maven-plugin:apply`.
5656
* The build includes checkstyle rules for many of our code conventions. Run
5757
`./mvnw validate` if you want to check you changes are compliant.
58-
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
58+
* Make sure all new `.java` files have a Javadoc class comment with at least an
5959
`@author` tag identifying you, and preferably at least a paragraph on what the class is
6060
for.
6161
* 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
@@ -1,7 +1,7 @@
11
= Spring Boot image:https://ci.spring.io/api/v1/teams/spring-boot/pipelines/spring-boot-2.1.x/jobs/build/badge["Build Status", link="https://ci.spring.io/teams/spring-boot/pipelines/spring-boot-2.1.x?groups=Build"] image:https://badges.gitter.im/Join Chat.svg["Chat",link="https://gitter.im/spring-projects/spring-boot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
22
:docs: https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference
33

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

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

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

196196

197197

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

203203

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

263263
* https://spring.io/guides/gs/spring-boot/[Building an Application with Spring Boot] is a
264-
very basic guide that shows you how to create a simple application, run it and add some
264+
very basic guide that shows you how to create an application, run it and add some
265265
management services.
266266
* https://spring.io/guides/gs/actuator-service/[Building a RESTful Web Service with Spring
267267
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
@@ -12,7 +12,7 @@ However, it is possible to <<configuration-metadata-additional-metadata,write pa
1212
[[configuration-metadata-format]]
1313
=== Metadata Format
1414
Configuration metadata files are located inside jars under `META-INF/spring-configuration-metadata.json`.
15-
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:
15+
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:
1616

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

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

741741
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).
742742
The annotation processor also supports the use of the `@Data`, `@Getter`, and `@Setter` lombok annotations.

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
@@ -26,7 +26,7 @@ It minimizes divergence between development and production environments.
2626

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

29-
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.
29+
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.
3030

3131

3232

@@ -227,7 +227,7 @@ The options include:
227227
* AWS Container Registry
228228

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

232232

233233

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

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

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

745745
| `STOP_WAIT_TIME`
746746
| 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
@@ -13,7 +13,7 @@ We then walk you through building your first Spring Boot application, discussing
1313

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

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

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

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

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

422422
[TIP]
@@ -626,7 +626,7 @@ Spring Boot still does its best to auto-configure your application.
626626
[[getting-started-first-application-main-method]]
627627
==== The "`main`" Method
628628
The final part of our application is the `main` method.
629-
This is just a standard method that follows the Java convention for an application entry point.
629+
This is a standard method that follows the Java convention for an application entry point.
630630
Our main method delegates to Spring Boot's `SpringApplication` class by calling `run`.
631631
`SpringApplication` bootstraps our application, starting Spring, which, in turn, starts the auto-configured Tomcat web server.
632632
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
@@ -40,7 +40,7 @@ The following example registers `ProjectConstraintViolationFailureAnalyzer`:
4040
com.example.ProjectConstraintViolationFailureAnalyzer
4141
----
4242

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

4545

4646

@@ -417,7 +417,7 @@ Many Spring Boot starters include default embedded containers.
417417
* 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.
418418

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

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

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

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

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

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

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

14011401
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
@@ -1733,8 +1733,7 @@ See {spring-boot-autoconfigure-module-code}/orm/jpa/HibernateJpaAutoConfiguratio
17331733
Hibernate {hibernate-docs}#caching[second-level cache] can be configured for a range of cache providers.
17341734
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.
17351735

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

17401739
[source,java,indent=0]
@@ -1765,10 +1764,9 @@ Spring Boot auto-configuration switches off its entity manager in the presence o
17651764

17661765
[[howto-use-two-entity-managers]]
17671766
=== Use Two EntityManagers
1768-
Even if the default `EntityManagerFactory` works fine, you need to define a new one.
1769-
Otherwise, the presence of the second bean of that type switches off the default.
1770-
To make it easy to do, you can use the convenient `EntityManagerBuilder` provided by Spring Boot.
1771-
Alternatively, you can just the `LocalContainerEntityManagerFactoryBean` directly from Spring ORM, as shown in the following example:
1767+
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.
1768+
You can use the `EntityManagerBuilder` provided by Spring Boot to help you to create one.
1769+
Alternatively, you can use the `LocalContainerEntityManagerFactoryBean` directly from Spring ORM, as shown in the following example:
17721770

17731771
[source,java,indent=0,subs="verbatim,quotes,attributes"]
17741772
----
@@ -2158,7 +2156,7 @@ Overriding the error page with your own depends on the templating technology tha
21582156
For example, if you use Thymeleaf, you can add an `error.html` template.
21592157
If you use FreeMarker, you can add an `error.ftl` template.
21602158
In general, you need a `View` that resolves with a name of `error` or a `@Controller` that handles the `/error` path.
2161-
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.
2159+
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.
21622160
See {spring-boot-autoconfigure-module-code}/web/servlet/error/ErrorMvcAutoConfiguration.java[`ErrorMvcAutoConfiguration`] for more options.
21632161

21642162
See also the section on "`<<boot-features-error-handling, Error Handling>>`" for details of how to register handlers in the servlet container.
@@ -2731,8 +2729,7 @@ TIP: Take a look at Spring Boot's sample applications for a {spring-boot-code}/s
27312729

27322730
[[howto-convert-an-existing-application-to-spring-boot]]
27332731
=== Convert an Existing Application to Spring Boot
2734-
For a non-web application, it should be easy to convert an existing Spring application to a Spring Boot application.
2735-
To do so, throw away the code that creates your `ApplicationContext` and replace it with calls to `SpringApplication` or `SpringApplicationBuilder`.
2732+
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`.
27362733
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.
27372734
See the https://spring.io/guides/gs/convert-jar-to-war/[Getting Started Guide on Converting a jar to a war].
27382735

@@ -2767,7 +2764,7 @@ If you have other features in your application (for instance, using other servle
27672764
* 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`.
27682765
* A `@Bean` of type `Filter` or `FilterRegistrationBean` behaves similarly (as a `<filter/>` and `<filter-mapping/>`).
27692766
* An `ApplicationContext` in an XML file can be added through an `@ImportResource` in your `Application`.
2770-
Alternatively, simple cases where annotation configuration is heavily used already can be recreated in a few lines as `@Bean` definitions.
2767+
Alternatively, cases where annotation configuration is heavily used already can be recreated in a few lines as `@Bean` definitions.
27712768

27722769
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:
27732770

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

28762873
The following example shows how to do so in Maven:
28772874

0 commit comments

Comments
 (0)