cancel
Showing results for 
Search instead for 
Did you mean: 

Providing parameters from context.xml

eren
Champ in-the-making
Champ in-the-making
Hi,

Could you use ServletContextPropertyPlaceholderConfigurer instead of PropertyPlaceholderConfigurer. In this way we can set parameters (database driver, database url etc) through context.xml (Tomcat). Moreover, we can deploy single war file to any environment without modifying the content.

This could also be applied to Activit Rest.


    <bean class="org.springframework.web.context.support.ServletContextPropertyPlaceholderConfigurer">
        <property name="searchContextAttributes" value="true"/>
        <property name="contextOverride" value="true"/>
        <property name="ignoreResourceNotFound" value="true"/>
        <property name="locations">
            <list>
                <value>classpath:db.properties</value>
            </list>
        </property>
    </bean>

Thanks,
Eren
1 REPLY 1

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
I do not think to replace that in general since you can fairly easily replace that yourself and a change would affect all people.