PDA

View Full Version : propertyConfigurer



paulheberer
Dec 7th, 2004, 08:50 AM
I am trying to do a simple property override in my ApplicationConfiguration.xml file. The first override example below works although the second one does not:

The loss.ds override below works:
<bean id="loss.lossCodeReadJdbcDAOTarget" class="com.amfam.loss.losscoderead.dao.LossCodeReadJdbcDA OImpl">
<property name="dataSource">
<ref bean="${loss.ds}" />
</property>
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>

The loss.tx override below fails:
<bean id="loss.perilDataFacade" parent="${loss.tx}">
<property name="target">
<ref bean="loss.perilDataFacadeTarget" />
</property>
</bean>

The following are the entries in my properties file:loss.tx=txProxyTemplate
loss.ds=datasource

The following is the error I am getting:
org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named '${loss.tx}' is defined:

Any help would be greatly appreciated.

robh
Dec 8th, 2004, 08:25 AM
Paul,

PropertyPlaceholderConfigurer will only replace tokens inside property value declarations, not in attributes of the <bean> tag itself.

Rob