Skip to content

Commit 6393569

Browse files
committed
Polish Externalized Configuration section
Closes gh-3823
1 parent 6869b0d commit 6393569

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,9 @@ Spring Boot allows you to externalize your configuration so you can work with th
224224
application code in different environments. You can use properties files, YAML files,
225225
environment variables and command-line arguments to externalize configuration. Property
226226
values can be injected directly into your beans using the `@Value` annotation, accessed
227-
via Spring's `Environment` abstraction or bound to structured objects.
227+
via Spring's `Environment` abstraction or
228+
<<boot-features-external-config-typesafe-configuration-properties,bound to structured objects>>
229+
via `@ConfigurationProperties`.
228230

229231
Spring Boot uses a very particular `PropertySource` order that is designed to allow
230232
sensible overriding of values, properties are considered in the the following order:
@@ -244,7 +246,8 @@ sensible overriding of values, properties are considered in the the following or
244246
variants).
245247
. Application properties packaged inside your jar (`application.properties` and YAML
246248
variants).
247-
. `@PropertySource` annotations on your `@Configuration` classes.
249+
. {spring-javadoc}/context/annotation/PropertySource.{dc-ext}[`@PropertySource`] annotations
250+
on your `@Configuration` classes.
248251
. Default properties (specified using `SpringApplication.setDefaultProperties`).
249252

250253
To provide a concrete example, suppose you develop a `@Component` that uses a
@@ -315,7 +318,8 @@ following locations and add them to the Spring `Environment`:
315318
. A classpath `/config` package
316319
. The classpath root
317320

318-
The list is ordered by precedence (locations higher in the list override lower items).
321+
The list is ordered by precedence (properties defined in locations higher in the list
322+
override those defined in lower locations).
319323

320324
NOTE: You can also <<boot-features-external-config-yaml, use YAML ('.yml') files>> as
321325
an alternative to '.properties'.

0 commit comments

Comments
 (0)