@ -37,7 +37,7 @@ spring.profiles= # comma list of active profiles
@@ -37,7 +37,7 @@ spring.profiles= # comma list of active profiles
spring.main.sources=
spring.main.web-environment= # detect by default
spring.main.show-bannder=true
spring.main.... # see class for all properties
spring.main....= # see class for all properties
# LOGGING
logging.path=/var/logs
@ -66,7 +66,7 @@ server.tomcat.max-threads = 0 # number of threads in protocol handler
@@ -66,7 +66,7 @@ server.tomcat.max-threads = 0 # number of threads in protocol handler
@ -146,7 +146,7 @@ The following configuration options are available for the `spring-boot:repackage
@@ -146,7 +146,7 @@ The following configuration options are available for the `spring-boot:repackage
|Name of the generated archive (defaults to `${project.build.finalName}`).
@ -120,10 +120,10 @@ you create the application to modify its behavior. Or you can externalize the
@@ -120,10 +120,10 @@ you create the application to modify its behavior. Or you can externalize the
configuration using properties in `spring.main.*`. E.g. in `application.properties` you
and then the Spring Boot banner will not be printed on startup, and the application will
@ -167,9 +167,9 @@ Some people like to use (for example) `--port=9000` instead of `--server.port=90
@@ -167,9 +167,9 @@ Some people like to use (for example) `--port=9000` instead of `--server.port=90
set configuration properties on the command line. You can easily enable this by using
NOTE: In this specific case the port binding will work in a PaaS environment like Heroku
@ -204,12 +204,12 @@ is 1-level deep and has period-separated keys, a lot like people are used to wit
@@ -204,12 +204,12 @@ is 1-level deep and has period-separated keys, a lot like people are used to wit
The example YAML above corresponds to an `application.properties` file
@ -1085,10 +1085,10 @@ standard behavior is determined by the presence or absence of certain request he
@@ -1085,10 +1085,10 @@ standard behavior is determined by the presence or absence of certain request he
work with most front end proxies. You switch on the valve by adding some entries to
`application.properties`, e.g.
[indent=0]
[source,properties,indent=0]
----
server.tomcat.remote_ip_header: x-forwarded-for
server.tomcat.protocol_header: x-forwarded-proto
server.tomcat.remote_ip_header=x-forwarded-for
server.tomcat.protocol_header=x-forwarded-proto
----
(The presence of either of those properties will switch on the valve. Or you can add the
@ -124,7 +124,7 @@ Endpoints can be customized using Spring properties. You can change if an endpoi
@@ -124,7 +124,7 @@ Endpoints can be customized using Spring properties. You can change if an endpoi
For example, here is an `application.properties` that changes the sensitivity and id
of the `beans` endpoint and also enables `shutdown`.
[indent=0]
[source,properties,indent=0]
----
endpoints.beans.id=springbeans
endpoints.beans.sensitive=false
@ -174,11 +174,11 @@ You can customize the data exposed by the `info` endpoint by settings `info.*` S
@@ -174,11 +174,11 @@ You can customize the data exposed by the `info` endpoint by settings `info.*` S
properties. All `Environment` properties under the info key will be automatically
exposed. For example, you could add the following to your `application.properties`:
[indent=0]
[source,properties,indent=0]
----
info.app.name: MyService
info.app.description: My awesome service
info.app.version: 1.0.0
info.app.name=MyService
info.app.description=My awesome service
info.app.version=1.0.0
----
If you are using Maven, you can automatically expand info properties from the Maven
You can then refer to your Maven ``project properties'' via placeholders, e.g.
[indent=0]
[source,properties,indent=0]
----
project.artifactId: myproject
project.name: Demo
project.version: X.X.X.X
project.description: Demo project for info endpoint
info.build.artifact: ${project.artifactId}
info.build.name: ${project.name}
info.build.description: ${project.description}
info.build.version: ${project.version}
project.artifactId=myproject
project.name=Demo
project.version=X.X.X.X
project.description=Demo project for info endpoint
info.build.artifact=${project.artifactId}
info.build.name=${project.name}
info.build.description=${project.description}
info.build.version=${project.version}
----
NOTE: In the above example we used `project.*` to set some values to be used as
@ -262,7 +262,7 @@ You can use Spring properties to change the username and passsword and to change
@@ -262,7 +262,7 @@ You can use Spring properties to change the username and passsword and to change
security role required to access the endpoints. For example, you might set the following
in your `application.properties`:
[indent=0]
[source,properties,indent=0]
----
security.user.name=admin
security.user.password=secret
@ -277,7 +277,7 @@ Sometimes it is useful to group all management endpoints under a single path. Fo
@@ -277,7 +277,7 @@ Sometimes it is useful to group all management endpoints under a single path. Fo
your application might already use `/info` for another purpose. You can use the
`management.contextPath` property to set a prefix for your manangement endpoint:
[indent=0]
[source,properties,indent=0]
----
management.contextpath=/manage
----
@ -297,7 +297,7 @@ The `management.port` property can be used to change the HTTP port. Since your m
@@ -297,7 +297,7 @@ The `management.port` property can be used to change the HTTP port. Since your m
port is often protected by a firewall, and not exposed to the public, you might also
want to disable management security:
[indent=0]
[source,properties,indent=0]
----
management.port=8081
management.security.enabled=false
@ -318,7 +318,7 @@ main server port.
@@ -318,7 +318,7 @@ main server port.
Here is an example `application.properties` that will not allow remote management
If you don't want to expose endpoints over HTTP you can set the management port to `-1`:
[indent=0]
[source,properties,indent=0]
----
management.port=-1
----
@ -357,7 +357,7 @@ to `true` so that MBean names are always unique.
@@ -357,7 +357,7 @@ to `true` so that MBean names are always unique.
You can also customize the JMX domain under which endpoints are exposed. Here is an
example `application.properties`:
[indent=0]
[source,properties,indent=0]
----
endpoints.jmx.domain=myapp
endpoints.jmx.uniqueNames=true
@ -370,7 +370,7 @@ example `application.properties`:
@@ -370,7 +370,7 @@ example `application.properties`:
If you don't want to expose endpoints over JMX you can set the `spring.jmx.enabled`
property to `false`:
[indent=0]
[source,properties,indent=0]
----
spring.jmx.enabled=false
----
@ -401,7 +401,7 @@ Jolokia has a number of settings that you would traditionally configure using se
@@ -401,7 +401,7 @@ Jolokia has a number of settings that you would traditionally configure using se
parameters. With Spring Boot you can use your `application.properties`, simply prefix the
parameter with `jolokia.config.`:
[indent=0]
[source,properties,indent=0]
----
jolokia.config.debug=true
----
@ -413,7 +413,7 @@ parameter with `jolokia.config.`:
@@ -413,7 +413,7 @@ parameter with `jolokia.config.`:
If you are using Jolokia but you don't want Spring Boot to configure it, simply set the
@ -284,10 +284,10 @@ The values in `application.properties` are filtered through the existing `Enviro
@@ -284,10 +284,10 @@ The values in `application.properties` are filtered through the existing `Enviro
when they are used so you can refer back to previously defined values (e.g. from System
properties).
[indent=0]
[source,properties,indent=0]
----
app.name: MyApp
app.description: ${app.name} is a Spring Boot application
app.name=MyApp
app.description=${app.name} is a Spring Boot application
----
TIP: You can also use this technique to create ``short'' variants of existing Spring Boot
@ -328,7 +328,7 @@ For example, the following YAML document:
@@ -328,7 +328,7 @@ For example, the following YAML document:
Would be transformed into these properties:
[indent=0]
[source,properties,indent=0]
----
environments.dev.url=http://dev.bar.com
environments.dev.name=Developer Setup
@ -348,7 +348,7 @@ and also as property keys with `[index]` dereferencers, for example this YAML:
@@ -348,7 +348,7 @@ and also as property keys with `[index]` dereferencers, for example this YAML:
Would be transformed into these properties:
[indent=0]
[source,properties,indent=0]
----
servers=dev.bar.com,foo.bar.com
servers[0]=dev.bar.com
@ -532,7 +532,7 @@ Spring Boot takes this a stage further, in that you can use a `spring.profiles.a
@@ -532,7 +532,7 @@ Spring Boot takes this a stage further, in that you can use a `spring.profiles.a
in any of the usual ways, for example you could include it in your
`application.properties`:
[indent=0]
[source,properties,indent=0]
----
spring.profiles.active=dev,hsqldb
----
@ -1036,12 +1036,12 @@ DataSource configuration is controlled by external configuration properties in
@@ -1036,12 +1036,12 @@ DataSource configuration is controlled by external configuration properties in
`spring.datasource.*`. For example, you might declare the following section
See {sc-spring-boot-autoconfigure}/jdbc/AbstractDataSourceConfiguration.{sc-ext}[`AbstractDataSourceConfiguration`]
@ -1268,10 +1268,10 @@ You can set `spring.data.mongodb.url` property to change the `url`, or alternati
@@ -1268,10 +1268,10 @@ You can set `spring.data.mongodb.url` property to change the `url`, or alternati
specify a `host`/`port`. For example, you might declare the following in your
`application.properties`:
[indent=0]
[source,properties,indent=0]
----
spring.data.mongodb.host=mongoserver
spring.data.mongodb.port=27017
spring.data.mongodb.host=mongoserver
spring.data.mongodb.port=27017
----
TIP: If `spring.data.mongodb.port` is not specified the default of `27017` is used. You