I would like to have the necessary resources, but ignore others if they are not enough ... How to do this? As I see, I can only do
<context:property-placeholder ignore-resource-not-found="true" location="required.properties, not-required-override.properties" />
Which affects every configuration there.
// EDIT This is a working example.
<bean id="requiredProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="locations"> <list> <value>classpath:database.properties</value> <value>classpath:storage.properties</value> <value>classpath:log4j.properties</value> <value>classpath:mailing.properties</value> </list> </property> </bean> <context:property-placeholder properties-ref="requiredProperties" ignore-resource-not-found="true" location="file:\${user.dir}/config/cvnizer.properties" />
source share