Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
efd1f609
Commit
efd1f609
authored
Aug 25, 2015
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.2.x'
parents
63d157bb
6393569d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
spring-boot-features.adoc
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+7
-3
No files found.
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
efd1f609
...
@@ -283,7 +283,9 @@ Spring Boot allows you to externalize your configuration so you can work with th
...
@@ -283,7 +283,9 @@ Spring Boot allows you to externalize your configuration so you can work with th
application code in different environments. You can use properties files, YAML files,
application code in different environments. You can use properties files, YAML files,
environment variables and command-line arguments to externalize configuration. Property
environment variables and command-line arguments to externalize configuration. Property
values can be injected directly into your beans using the `@Value` annotation, accessed
values can be injected directly into your beans using the `@Value` annotation, accessed
via Spring's `Environment` abstraction or bound to structured objects.
via Spring's `Environment` abstraction or
<<boot-features-external-config-typesafe-configuration-properties,bound to structured objects>>
via `@ConfigurationProperties`.
Spring Boot uses a very particular `PropertySource` order that is designed to allow
Spring Boot uses a very particular `PropertySource` order that is designed to allow
sensible overriding of values, properties are considered in the following order:
sensible overriding of values, properties are considered in the following order:
...
@@ -303,7 +305,8 @@ sensible overriding of values, properties are considered in the following order:
...
@@ -303,7 +305,8 @@ sensible overriding of values, properties are considered in the following order:
variants).
variants).
. Application properties packaged inside your jar (`application.properties` and YAML
. Application properties packaged inside your jar (`application.properties` and YAML
variants).
variants).
. `@PropertySource` annotations on your `@Configuration` classes.
. {spring-javadoc}/context/annotation/PropertySource.{dc-ext}[`@PropertySource`] annotations
on your `@Configuration` classes.
. Default properties (specified using `SpringApplication.setDefaultProperties`).
. Default properties (specified using `SpringApplication.setDefaultProperties`).
To provide a concrete example, suppose you develop a `@Component` that uses a
To provide a concrete example, suppose you develop a `@Component` that uses a
...
@@ -374,7 +377,8 @@ following locations and add them to the Spring `Environment`:
...
@@ -374,7 +377,8 @@ following locations and add them to the Spring `Environment`:
. A classpath `/config` package
. A classpath `/config` package
. The classpath root
. The classpath root
The list is ordered by precedence (locations higher in the list override lower items).
The list is ordered by precedence (properties defined in locations higher in the list
override those defined in lower locations).
NOTE: You can also <<boot-features-external-config-yaml, use YAML ('.yml') files>> as
NOTE: You can also <<boot-features-external-config-yaml, use YAML ('.yml') files>> as
an alternative to '.properties'.
an alternative to '.properties'.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment