@@ -224,7 +224,9 @@ Spring Boot allows you to externalize your configuration so you can work with th
224
224
application code in different environments. You can use properties files, YAML files,
225
225
environment variables and command-line arguments to externalize configuration. Property
226
226
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`.
228
230
229
231
Spring Boot uses a very particular `PropertySource` order that is designed to allow
230
232
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
244
246
variants).
245
247
. Application properties packaged inside your jar (`application.properties` and YAML
246
248
variants).
247
- . `@PropertySource` annotations on your `@Configuration` classes.
249
+ . {spring-javadoc}/context/annotation/PropertySource.{dc-ext}[`@PropertySource`] annotations
250
+ on your `@Configuration` classes.
248
251
. Default properties (specified using `SpringApplication.setDefaultProperties`).
249
252
250
253
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`:
315
318
. A classpath `/config` package
316
319
. The classpath root
317
320
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).
319
323
320
324
NOTE: You can also <<boot-features-external-config-yaml, use YAML ('.yml') files>> as
321
325
an alternative to '.properties'.
0 commit comments