Announcement Announcement Module
Collapse
No announcement yet.
context:property-placeholder ERROR Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • context:property-placeholder ERROR

    Given the below code
    Code:
        <context:property-placeholder
            location="${config.location}"
            system-properties-mode="OVERRIDE"
            ignore-resource-not-found="true"
            ignore-unresolvable="true"
        />
    and considering that ${config.location} has as value a csv (ex: file: prop1,file: prop2) the property placeholder does not work correct.
    I debuged into the code and it tries to load a file with the name "file: prop1,file: prop2" - it does not see that there are 2 resources separated by comma.

    If one would change the location to
    Code:
            location="file:prop1,file:prop2"
    it would work fine.

    I can't provide a patch as I am no that familiar with the inner workings of spring, but debugging leads me to
    class AbstractAutowireCapableBeanFactory, method applyPropertyValues
    Here in the first case the value of the property location is a String[1] and the result of resolving placeholders will be also a 1 item array, while in the second case it is a String[2] having already separated the 2 paths to the files.

    I use spring 3.0.5.RELEASE

    Thank you.
Working...
X