Results 1 to 2 of 2

Thread: propertyConfigurer

  1. #1
    Join Date
    Oct 2004
    Posts
    4

    Default propertyConfigurer

    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.LossCodeRea dJdbcDAOImpl">
    <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.

  2. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Paul,

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

    Rob

Similar Threads

  1. Order of Bean definitions matters?
    By cfuser in forum Container
    Replies: 2
    Last Post: Oct 21st, 2005, 10:29 AM
  2. using propertyConfigurer
    By suddal72 in forum Container
    Replies: 1
    Last Post: Aug 3rd, 2005, 05:57 AM
  3. Replies: 1
    Last Post: Apr 13th, 2005, 10:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •