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

  • property-placeholder fallback setup

    Hi,

    I want to configure my property placeholder configurer such that it will use an external file if the PROPERTIES_DIR env variable is set and the properties file exists. If this isnt the case i want it to fall back to a copy of the properties file that is on the classpath in the web application.

    I have currently configured this but get a filenotfoundexception

    Code:
    <context:property-placeholder location="${PROPERTIES_DIR}/myapp.properties" order="1" ignore-unresolvable="true" />
    <context:property-placeholder location="classpath:myapp.properties" order="2"/>
    How can I set this up appropriately ?

    Thanks.
Working...
X