Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-9989

Using multiple PropertyPlaceholderConfigurer breaks @Value default value behavior

    XMLWordPrintable

    Details

    • Last commented by a User:
      true

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              vanackej Johann Vanackere
              Last updater:
              Spring Issuemaster
              Votes:
              41 Vote for this issue
              Watchers:
              43 Start watching this issue

                Dates

                Created:
                Updated:
                Days since last comment:
                1 year, 20 weeks, 3 days ago