You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-configuration-metadata.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ However, it is possible to <<configuration-metadata-additional-metadata,write pa
14
14
[[configuration-metadata-format]]
15
15
== Metadata Format
16
16
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:
18
18
19
19
[source,json,indent=0]
20
20
----
@@ -762,7 +762,7 @@ This dependency ensures that the additional metadata is available when the annot
762
762
The processor picks up both classes and methods that are annotated with `@ConfigurationProperties`.
763
763
The Javadoc for field values within configuration classes is used to populate the `description` attribute.
764
764
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.
766
766
767
767
If the class has a single constructor with at least one parameters, one property is created per constructor parameter.
768
768
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).
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/main/asciidoc/deployment.adoc
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ It minimizes divergence between development and production environments.
78
78
79
79
Ideally, your application, like a Spring Boot executable jar, has everything that it needs to run packaged within it.
80
80
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.
82
82
83
83
84
84
@@ -278,7 +278,7 @@ The options include:
278
278
* AWS Container Registry
279
279
280
280
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.
282
282
283
283
284
284
@@ -450,7 +450,7 @@ Then deploy with `mvn appengine:deploy` (if you need to authenticate first, the
450
450
== Installing Spring Boot Applications
451
451
In addition to running Spring Boot applications by using `java -jar`, it is also possible to make fully executable applications for Unix systems.
452
452
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.
454
454
455
455
CAUTION: Fully executable jars work by embedding an extra script at the front of the file.
456
456
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:
800
800
| The explicit location of the jar file, in case the script is being used to launch a jar that it is not actually embedded.
801
801
802
802
| `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.
804
804
805
805
| `STOP_WAIT_TIME`
806
806
| The time in seconds to wait when stopping the application before forcing a shutdown (`60` by default).
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.
42
42
43
43
44
44
@@ -415,7 +415,7 @@ Many Spring Boot starters include default embedded containers.
415
415
* 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.
416
416
417
417
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.
419
419
420
420
The following Maven example shows how to exclude Tomcat and include Jetty for Spring MVC:
421
421
@@ -1029,7 +1029,7 @@ The `ObjectMapper` (or `XmlMapper` for Jackson XML converter) instance (created
1029
1029
Spring Boot also has some features to make it easier to customize this behavior.
1030
1030
1031
1031
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.
1033
1033
These features are described in six enums (in Jackson) that map onto properties in the environment:
1034
1034
1035
1035
|===
@@ -1290,7 +1290,7 @@ This ensures efficient sharing of resources for the server receiving requests an
1290
1290
== Logging
1291
1291
Spring Boot has no mandatory logging dependency, except for the Commons Logging API, which is typically provided by Spring Framework's `spring-jcl` module.
1292
1292
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`.
1294
1294
For a web application, you need only `spring-boot-starter-web`, since it depends transitively on the logging starter.
1295
1295
If you use Maven, the following dependency adds logging for you:
1296
1296
@@ -1405,7 +1405,7 @@ Spring Boot supports https://logging.apache.org/log4j/2.x/[Log4j 2] for logging
1405
1405
If you use the starters for assembling dependencies, you have to exclude Logback and then include log4j 2 instead.
1406
1406
If you do not use the starters, you need to provide (at least) `spring-jcl` in addition to Log4j 2.
1407
1407
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.
1409
1409
The following example shows how to set up the starters in Maven:
@@ -1739,8 +1739,7 @@ See {spring-boot-autoconfigure-module-code}/orm/jpa/HibernateJpaAutoConfiguratio
1739
1739
Hibernate {hibernate-docs}#caching[second-level cache] can be configured for a range of cache providers.
1740
1740
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.
1741
1741
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.
1744
1743
Then, add a `HibernatePropertiesCustomizer` bean as shown in the following example:
1745
1744
1746
1745
[source,java,indent=0]
@@ -1771,10 +1770,9 @@ Spring Boot auto-configuration switches off its entity manager in the presence o
1771
1770
1772
1771
[[howto-use-two-entity-managers]]
1773
1772
=== 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:
@@ -2216,7 +2214,7 @@ Overriding the error page with your own depends on the templating technology tha
2216
2214
For example, if you use Thymeleaf, you can add an `error.html` template.
2217
2215
If you use FreeMarker, you can add an `error.ftlh` template.
2218
2216
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.
2220
2218
See {spring-boot-autoconfigure-module-code}/web/servlet/error/ErrorMvcAutoConfiguration.java[`ErrorMvcAutoConfiguration`] for more options.
2221
2219
2222
2220
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
=== 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`.
2779
2776
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.
2780
2777
See the https://spring.io/guides/gs/convert-jar-to-war/[Getting Started Guide on Converting a jar to a war].
2781
2778
@@ -2810,7 +2807,7 @@ If you have other features in your application (for instance, using other servle
2810
2807
* 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`.
2811
2808
* A `@Bean` of type `Filter` or `FilterRegistrationBean` behaves similarly (as a `<filter/>` and `<filter-mapping/>`).
2812
2809
* 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.
2814
2811
2815
2812
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:
2816
2813
@@ -2914,7 +2911,7 @@ You can do so by adding a `WEB-INF/weblogic.xml` file with the following content
2914
2911
=== Use Jedis Instead of Lettuce
2915
2912
By default, the Spring Boot starter (`spring-boot-starter-data-redis`) uses https://github.com/lettuce-io/lettuce-core/[Lettuce].
2916
2913
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.
2918
2915
2919
2916
The following example shows how to do so in Maven:
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Auditing, health, and metrics gathering can also be automatically applied to you
11
11
[[production-ready-enabling]]
12
12
== Enabling Production-ready Features
13
13
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`'.
15
15
16
16
.Definition of Actuator
17
17
****
@@ -2009,7 +2009,7 @@ You can also add any number of `tag=KEY:VALUE` query parameters to the end of th
2009
2009
====
2010
2010
The reported measurements are the _sum_ of the statistics of all meters matching the meter name and any tags that have been applied.
2011
2011
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`.
0 commit comments