-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Closed
Copy link
Labels
has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importIssues migrated from JIRA with more than 10 votes at the time of importin: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: documentationA documentation taskA documentation task
Milestone
Description
Johann Vanackere opened SPR-9989 and commented
When using multiple PropertyPlaceholderConfigurer
in conjunction with @Value
annotation and default value for placeholders syntax (ie ${key:defaultValue}
), only the first PropertyPlaceholderConfigurer
is used. If this configurer does not contain the desired value, it falls back to @Value
default even if the second PropertyPlaceholderConfigurer
contains the value.
You'll find attached a JUnit test case with Spring xml context to reproduce the issue.
Affects: 3.1.3
Attachments:
- PropertyPlaceholderDefaultValueTest.java (1010 bytes)
- propertyPlaceholder-test.xml (1.31 kB)
- test-spring-placeholder.zip (4.84 kB)
Issue Links:
- Default resolved property value is not working properly [SPR-10619] #15247 Default resolved property value is not working properly ("is duplicated by")
- Multiple PropertySourcesPlaceholderConfigurers do not work with placeholder defaults [SPR-10240] #14873 Multiple PropertySourcesPlaceholderConfigurers do not work with placeholder defaults ("is duplicated by")
- Improve property placeholder resolution when multiple configurers are declared [SPR-10654] #15282 Improve property placeholder resolution when multiple configurers are declared ("is duplicated by")
Referenced from: commits spring-attic/spring-framework-issues@0017731
41 votes, 43 watchers
antoinemeyer, gzp-gnr, odromaniuk, qianlong, PatelVishalJ and 2 more
Metadata
Metadata
Assignees
Labels
has: votes-jiraIssues migrated from JIRA with more than 10 votes at the time of importIssues migrated from JIRA with more than 10 votes at the time of importin: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: documentationA documentation taskA documentation task