“Location, Location, Location” may not be enough.
Having property files loaded using ProperyPlaceholderConfigurer bean or the modern <context:property-placeholder> can become a real pain when the placeholders are distributed among the jars.
<context:property-placeholder location=”classpath*:*.properties”/>
Well, only location can be set here, the rest is default. Pretty cool, but it is not doing it… We look back to the old fashion bean
<bean class=”org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”>
<property name=”locations” value=”classpath:*.properties”/>
</bean>
The hack comes here: change from the default placeholderPrefix to a specific one, unique among jars used and everything is gonna be alright.
<property name=”placeholderPrefix” value=”£{“/>
Don’t forget now to change the references to the properties (from ${…} to £{…}).