Announcement Announcement Module
Collapse
No announcement yet.
Overriding classpath resource Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Overriding classpath resource

    Hi all:

    I“ve got several applications packed as jar and war files, i“m using ClassPathXmlApplicationContext to load configuration and in my xml files i“ve defined a PropertyPlaceHolderConfigurer this way:
    <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer" lazy-init="default" autowire="default" dependency-check="default">
    - <property name="locations">
    - <list>
    <value>classpath:/jndiJBoss_ControlProcesosRecepcion.properties</value>
    </list>
    </property>
    </bean>
    When packaging the applications i add the requiered .properties and all works great, but this applications are going to be deployed in very diferent enviroments and i would like some way to "override" the properties files included in my jars or wars, i“ve tried to add new properties into my server lib folder wich is supossed to be in my application“s classpath and similar solutions but it is not working.

    Has anyone done something similar or can help me in achieve this? I“m not allowed to modify any code so i don“t know if this is even possible.

    Thanks.

  • #2
    Not sure if this is going to help you, but the way we are using is, not including any of the .properties files in our .jar files. All our .properties files are outside our deployment packages so that we don't rebuild our jars if .properties files are modified.

    Comment


    • #3
      Thanks for the answer

      Yes, we“re doing that way too,

      Regards, Raśl

      Comment

      Working...
      X