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
+6-3
Original file line number
Diff line number
Diff line change
@@ -88,7 +88,8 @@ For example, `server.port` and `server.address` might be specified in `applicati
88
88
The "`groups`" are higher level items that do not themselves specify a value but instead provide a contextual grouping for properties.
89
89
For example, the `server.port` and `server.address` properties are part of the `server` group.
90
90
91
-
NOTE: It is not required that every "`property`" has a "`group`". Some properties might exist in their own right.
91
+
NOTE: It is not required that every "`property`" has a "`group`".
92
+
Some properties might exist in their own right.
92
93
93
94
Finally, "`hints`" are additional information used to assist the user in configuring a given property.
94
95
For example, when a developer is configuring the `spring.jpa.hibernate.ddl-auto` property, a tool can use the hints to offer some auto-completion help for the `none`, `validate`, `update`, `create`, and `create-drop` values.
@@ -105,7 +106,8 @@ The JSON object contained in the `groups` array can contain the attributes shown
105
106
106
107
| `name`
107
108
| String
108
-
| The full name of the group. This attribute is mandatory.
109
+
| The full name of the group.
110
+
This attribute is mandatory.
109
111
110
112
| `type`
111
113
| String
@@ -315,7 +317,8 @@ The JSON object contained in the `providers` attribute of each `hint` element ca
315
317
316
318
[[configuration-metadata-repeated-items]]
317
319
==== Repeated Metadata Items
318
-
Objects with the same "`property`" and "`group`" name can appear multiple times within a metadata file. For example, you could bind two separate classes to the same prefix, with each having potentially overlapping property names.
320
+
Objects with the same "`property`" and "`group`" name can appear multiple times within a metadata file.
321
+
For example, you could bind two separate classes to the same prefix, with each having potentially overlapping property names.
319
322
While the same names appearing in the metadata multiple times should not be common, consumers of metadata should take care to ensure that they support it.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/main/asciidoc/build-tool-plugins.adoc
+2-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@
3
3
4
4
[partintro]
5
5
--
6
-
Spring Boot provides build tool plugins for Maven and Gradle. The plugins offer a variety of features, including the packaging of executable jars.
6
+
Spring Boot provides build tool plugins for Maven and Gradle.
7
+
The plugins offer a variety of features, including the packaging of executable jars.
7
8
This section provides more details on both plugins as well as some help should you need to extend an unsupported build system.
8
9
If you are just getting started, you might want to read "`<<using-spring-boot.adoc#using-boot-build-systems>>`" from the "`<<using-spring-boot.adoc#using-boot>>`" section first.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/main/asciidoc/deployment.adoc
+14-7
Original file line number
Diff line number
Diff line change
@@ -402,7 +402,8 @@ A fully executable jar can be executed like any other executable binary or it ca
402
402
This makes it very easy to install and manage Spring Boot applications in common production environments.
403
403
404
404
CAUTION: Fully executable jars work by embedding an extra script at the front of the file.
405
-
Currently, some tools do not accept this format, so you may not always be able to use this technique. For example, `jar -xf` may silently fail to extract a jar or war that has been made fully executable.
405
+
Currently, some tools do not accept this format, so you may not always be able to use this technique.
406
+
For example, `jar -xf` may silently fail to extract a jar or war that has been made fully executable.
406
407
It is recommended that you make your jar or war fully executable only if you intend to execute it directly, rather than running it with `java -jar`or deploying it to a servlet container.
407
408
408
409
To create a '`fully executable`' jar with Maven, use the following plugin configuration:
@@ -522,7 +523,8 @@ One way to protect against this is to make it immutable by using `chattr`, as sh
522
523
This will prevent any user, including root, from modifying the jar.
523
524
524
525
If root is used to control the application's service and you <<deployment-script-customization-conf-file, use a `.conf` file>> to customize its startup, the `.conf` file is read and evaluated by the root user.
525
-
It should be secured accordingly. Use `chmod` so that the file can only be read by the owner and use `chown` to make root the owner, as shown in the following example:
526
+
It should be secured accordingly.
527
+
Use `chmod` so that the file can only be read by the owner and use `chown` to make root the owner, as shown in the following example:
526
528
527
529
[indent=0,subs="verbatim,quotes,attributes"]
528
530
----
@@ -652,17 +654,20 @@ The following property substitutions are supported with the default script:
652
654
|
653
655
654
656
| `logFolder`
655
-
| Default value for `LOG_FOLDER`. Only valid for an `init.d` service
657
+
| Default value for `LOG_FOLDER`.
658
+
Only valid for an `init.d` service
656
659
|
657
660
|
658
661
659
662
| `logFilename`
660
-
| Default value for `LOG_FILENAME`. Only valid for an `init.d` service
663
+
| Default value for `LOG_FILENAME`.
664
+
Only valid for an `init.d` service
661
665
|
662
666
|
663
667
664
668
| `pidFolder`
665
-
| Default value for `PID_FOLDER`. Only valid for an `init.d` service
669
+
| Default value for `PID_FOLDER`.
670
+
Only valid for an `init.d` service
666
671
|
667
672
|
668
673
@@ -678,7 +683,8 @@ The following property substitutions are supported with the default script:
678
683
| `true`
679
684
680
685
| `stopWaitTime`
681
-
| Default value for `STOP_WAIT_TIME` in seconds. Only valid for an `init.d` service
686
+
| Default value for `STOP_WAIT_TIME` in seconds.
687
+
Only valid for an `init.d` service
682
688
| 60
683
689
| 60
684
690
|===
@@ -740,7 +746,8 @@ The following environment properties are supported with the default script:
740
746
| The time in seconds to wait when stopping the application before forcing a shutdown (`60` by default).
741
747
|===
742
748
743
-
NOTE: The `PID_FOLDER`, `LOG_FOLDER`, and `LOG_FILENAME` variables are only valid for an `init.d` service. For `systemd`, the equivalent customizations are made by using the '`service`' script.
749
+
NOTE: The `PID_FOLDER`, `LOG_FOLDER`, and `LOG_FILENAME` variables are only valid for an `init.d` service.
750
+
For `systemd`, the equivalent customizations are made by using the '`service`' script.
744
751
See the https://www.freedesktop.org/software/systemd/man/systemd.service.html[service unit configuration man page] for more details.
The `${..}` style conflicts with Spring's own property placeholder mechanism.
216
217
To use Spring property placeholders together with automatic expansion, escape the Spring property placeholders as follows: `\${..}`.
217
218
218
219
@@ -648,7 +649,8 @@ Generally, you should first consider using one of the many available configurati
648
649
The `server.{asterisk}` namespace is quite useful here, and it includes namespaces like `server.tomcat.{asterisk}`, `server.jetty.{asterisk}` and others, for server-specific features.
649
650
See the list of <<common-application-properties>>.
650
651
651
-
The previous sections covered already many common use cases, such as compression, SSL or HTTP/2. However, if a configuration key doesn't exist for your use case, you should then look at {spring-boot-module-api}/web/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`].
652
+
The previous sections covered already many common use cases, such as compression, SSL or HTTP/2.
653
+
However, if a configuration key doesn't exist for your use case, you should then look at {spring-boot-module-api}/web/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`].
652
654
You can declare such a component and get access to the server factory relevant to your choice: you should select the variant for the chosen Server (Tomcat, Jetty, Reactor Netty, Undertow) and the chosen web stack (Servlet or Reactive).
653
655
654
656
The example below is for Tomcat with the `spring-boot-starter-web` (Servlet stack):
@@ -1147,7 +1149,8 @@ If you add your own, you have to be aware of the order and in which position you
1147
1149
There is a useful https://spring.io/blog/2013/06/03/content-negotiation-using-views[blog about `ContentNegotiatingViewResolver`] that you might like to study to learn more, and you might also look at the source code for detail.
1148
1150
You can switch off the auto-configured `ContentNegotiatingViewResolver` by defining a bean named '`viewResolver`'.
1149
1151
* If you use Thymeleaf, you also have a `ThymeleafViewResolver` named '`thymeleafViewResolver`'.
1150
-
It looks for resources by surrounding the view name with a prefix and suffix. The prefix is `spring.thymeleaf.prefix`, and the suffix is `spring.thymeleaf.suffix`.
1152
+
It looks for resources by surrounding the view name with a prefix and suffix.
1153
+
The prefix is `spring.thymeleaf.prefix`, and the suffix is `spring.thymeleaf.suffix`.
1151
1154
The values of the prefix and suffix default to '`classpath:/templates/`' and '`.html`', respectively.
1152
1155
You can override `ThymeleafViewResolver` by providing a bean of the same name.
1153
1156
* If you use FreeMarker, you also have a `FreeMarkerViewResolver` named '`freeMarkerViewResolver`'.
@@ -1495,7 +1498,8 @@ The following example shows how to define a JDBC data source by setting properti
1495
1498
1496
1499
However, there is a catch.
1497
1500
Because the actual type of the connection pool is not exposed, no keys are generated in the metadata for your custom `DataSource` and no completion is available in your IDE (because the `DataSource` interface exposes no properties).
1498
-
Also, if you happen to have Hikari on the classpath, this basic setup does not work, because Hikari has no `url` property (but does have a `jdbcUrl` property). In that case, you must rewrite your configuration as follows:
1501
+
Also, if you happen to have Hikari on the classpath, this basic setup does not work, because Hikari has no `url` property (but does have a `jdbcUrl` property).
1502
+
In that case, you must rewrite your configuration as follows:
1499
1503
1500
1504
[source,properties,indent=0]
1501
1505
----
@@ -1551,7 +1555,8 @@ See "`<<spring-boot-features.adoc#boot-features-configure-datasource>>`" in the
1551
1555
If you need to configure multiple data sources, you can apply the same tricks that are described in the previous section.
1552
1556
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.
1553
1557
1554
-
If you create your own `DataSource`, the auto-configuration backs off. In the following example, we provide the _exact_ same feature set as the auto-configuration provides on the primary data source:
1558
+
If you create your own `DataSource`, the auto-configuration backs off.
1559
+
In the following example, we provide the _exact_ same feature set as the auto-configuration provides on the primary data source:
TIP: `firstDataSourceProperties` has to be flagged as `@Primary` so that the database initializer feature uses your copy (if you use the initializer).
1562
1567
1563
-
Both data sources are also bound for advanced customizations. For instance, you could configure them as follows:
1568
+
Both data sources are also bound for advanced customizations.
1569
+
For instance, you could configure them as follows:
1564
1570
1565
1571
[source,properties,indent=0]
1566
1572
----
@@ -1699,7 +1705,8 @@ See {spring-boot-autoconfigure-module-code}/orm/jpa/HibernateJpaAutoConfiguratio
1699
1705
Hibernate {hibernate-docs}#caching[second-level cache] can be configured for a range of cache providers.
1700
1706
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.
1701
1707
1702
-
If you're using JCache, this is pretty easy. First, make sure that `org.hibernate:hibernate-jcache` is available on the classpath.
1708
+
If you're using JCache, this is pretty easy.
1709
+
First, make sure that `org.hibernate:hibernate-jcache` is available on the classpath.
1703
1710
Then, add a `HibernatePropertiesCustomizer` bean as shown in the following example:
1704
1711
1705
1712
[source,java,indent=0]
@@ -1879,7 +1886,8 @@ This is controlled through two external properties:
1879
1886
You can set `spring.jpa.hibernate.ddl-auto` explicitly and the standard Hibernate property values are `none`, `validate`, `update`, `create`, and `create-drop`.
1880
1887
Spring Boot chooses a default value for you based on whether it thinks your database is embedded.
1881
1888
It defaults to `create-drop` if no schema manager has been detected or `none` in all other cases.
1882
-
An embedded database is detected by looking at the `Connection` type. `hsqldb`, `h2`, and `derby` are embedded, and others are not.
1889
+
An embedded database is detected by looking at the `Connection` type.
1890
+
`hsqldb`, `h2`, and `derby` are embedded, and others are not.
1883
1891
Be careful when switching from in-memory to a '`real`' database that you do not make assumptions about the existence of the tables and data in the new platform.
1884
1892
You either have to set `ddl-auto` explicitly or use one of the other mechanisms to initialize the database.
1885
1893
@@ -2090,7 +2098,8 @@ See {spring-boot-autoconfigure-module-code}/batch/BatchAutoConfiguration.java[Ba
2090
2098
2091
2099
[[howto-actuator]]
2092
2100
== Actuator
2093
-
Spring Boot includes the Spring Boot Actuator. This section answers questions that often arise from its use.
2101
+
Spring Boot includes the Spring Boot Actuator.
2102
+
This section answers questions that often arise from its use.
2094
2103
2095
2104
2096
2105
@@ -2169,7 +2178,8 @@ You can switch on the valve by adding some entries to `application.properties`,
2169
2178
server.tomcat.protocol-header=x-forwarded-proto
2170
2179
----
2171
2180
2172
-
(The presence of either of those properties switches on the valve. Alternatively, you can add the `RemoteIpValve` by adding a `TomcatServletWebServerFactory` bean.)
2181
+
(The presence of either of those properties switches on the valve.
2182
+
Alternatively, you can add the `RemoteIpValve` by adding a `TomcatServletWebServerFactory` bean.)
2173
2183
2174
2184
To configure Spring Security to require a secure channel for all (or some) requests, consider adding your own `WebSecurityConfigurerAdapter` that adds the following `HttpSecurity` configuration:
2175
2185
@@ -2191,7 +2201,8 @@ To configure Spring Security to require a secure channel for all (or some) reque
2191
2201
2192
2202
[[howto-hotswapping]]
2193
2203
== Hot Swapping
2194
-
Spring Boot supports hot swapping. This section answers questions about how it works.
2204
+
Spring Boot supports hot swapping.
2205
+
This section answers questions about how it works.
2195
2206
2196
2207
2197
2208
@@ -2760,7 +2771,8 @@ See the <<howto-build-an-application-context-hierarchy, entry on building a hier
2760
2771
An existing parent context that contains web-specific features usually needs to be broken up so that all the `ServletContextAware` components are in the child context.
2761
2772
2762
2773
Applications that are not already Spring applications might be convertible to Spring Boot applications, and the previously mentioned guidance may help.
2763
-
However, you may yet encounter problems. In that case, we suggest https://stackoverflow.com/questions/tagged/spring-boot[asking questions on Stack Overflow with a tag of `spring-boot`].
2774
+
However, you may yet encounter problems.
2775
+
In that case, we suggest https://stackoverflow.com/questions/tagged/spring-boot[asking questions on Stack Overflow with a tag of `spring-boot`].
0 commit comments