File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
framework-docs/modules/ROOT/pages/core Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,17 @@ is a convenience mechanism that sets up a xref:core/beans/factory-extension.adoc
565
565
for you. If you need more control over the specific
566
566
`PropertySourcesPlaceholderConfigurer` setup, you can explicitly define it as a bean yourself.
567
567
568
+ [WARNING]
569
+ =====
570
+ Only one such element should be defined for a given application with the properties
571
+ that it needs. Several property placeholders can be configured as long as they have distinct
572
+ placeholder syntax (`${...}`).
573
+
574
+ If you need to modularize the source of properties used for the replacement, you should
575
+ not create multiple properties placeholders. Rather, each module should contribute a
576
+ `PropertySource` to the `Environment`. Alternatively, you can create your own
577
+ `PropertySourcesPlaceholderConfigurer` bean that gathers the properties to use.
578
+ =====
568
579
569
580
[[xsd-schemas-context-ac]]
570
581
=== Using `<annotation-config/>`
Original file line number Diff line number Diff line change @@ -372,6 +372,17 @@ The `PropertySourcesPlaceholderConfigurer` not only looks for properties in the
372
372
file you specify. By default, if it cannot find a property in the specified properties files,
373
373
it checks against Spring `Environment` properties and regular Java `System` properties.
374
374
375
+ [WARNING]
376
+ =====
377
+ Only one such element should be defined for a given application with the properties
378
+ that it needs. Several property placeholders can be configured as long as they have distinct
379
+ placeholder syntax (`${...}`).
380
+
381
+ If you need to modularize the source of properties used for the replacement, you should
382
+ not create multiple properties placeholders. Rather, you should create your own
383
+ `PropertySourcesPlaceholderConfigurer` bean that gathers the properties to use.
384
+ =====
385
+
375
386
[TIP]
376
387
=====
377
388
You can use the `PropertySourcesPlaceholderConfigurer` to substitute class names, which
You can’t perform that action at this time.
0 commit comments