Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13752

Make a BridgePropertyPlaceholderConfigurer equivalent for PropertySourcePlaceholderConfigurer

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 2.24.1, 3.0.0.M4
    • None
    • camel-spring
    • None
    • Unknown

    Description

      BridgePropertyPlaceholderConfigurer extends Spring's PropertyPlaceholderConfigurer. Spring recommends against using this class for new code, and has a replacement in the PropertySourcesPlaceholderConfigurer. The new class is a prerequisite for e.g. the @TestPropertySource annotation to work. Example usage here https://github.com/apache/camel/blob/camel-2.23.1/components/camel-test-spring/src/test/java/org/apache/camel/test/spring/CamelSpringRunnerTestPropertySourceTest.java

      It's not obvious to me whether it would be safe to reimplement BridgePropertyPlaceholderConfigurer to extend PropertySourcesPlaceholderConfigurer instead. I'd guess it wouldn't be backwards compatible, otherwise Spring would probably have just reimplemented PropertyPlaceholderConfigurer.

      I think we should add a new BridgePropertySourcesPlaceholderConfigurer that extends PropertySourcesPlaceholderConfigurer. This will allow users to use the Camel property bridging functionality, without losing the ability to override Spring properties in tests.

      I am happy to work on this if the idea makes sense.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              srdo Stig Rohde Døssing
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m