Results 1 to 3 of 3

Thread: Overriding classpath resource

  1. #1

    Default 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. #2

    Default

    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.

  3. #3

    Default

    Thanks for the answer

    Yes, we“re doing that way too,

    Regards, Raśl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •