We have this existing property loader configuration in our spring context
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<util:list>
<value>hedging-service.properties</value>
</util:list>
</property>
</bean>
<!--Hedging properties bean that can be injected into other beans-->
<util:properties id="hedgingProperties" location="classpath:hedging-service.properties"/>
and there is a bean which references the hedgingProperties
bean
<bean id="mailProcessor"
class="a.b.c.MailProcessor">
<property name="properties" ref="hedgingProperties"/>
...
</bean>
I'm refactoring the context to load from multiple property files and also avoid the duplicate definition of the properties. My first attempt is to use this bean in place of the two above
<context:property-placeholder location="classpath:hedging-service-core.properties,classpath:hedging-service.properties,classpath:icon.properties"/>
but how can I retain the alias or reference to the hedgingProperties
bean when I use the context:property-placeholder
?