Results 1 to 2 of 2

Thread: Autowiring

  1. #1
    Join Date
    Aug 2007
    Location
    Folkestone,Kent,United Kingdom
    Posts
    34

    Default Autowiring

    Hi All,

    got a very basic question.We know the beans which refer to each other has autowiring be it byType,byName etc.
    I have snippet of my xml file

    Code:
    <bean name="properties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >
    
    <property name="locations">
    
    <list>
    
    <value>classpath:jdbc.properties</value>
    
    <value>classpath:log4j.properties</value>
    
    </list>
    
    </property>
    
    </bean>
    
    
    
    
    <bean id="props" class="example2.PropertiesBean" >
    
    <property name="properties">
    
    <props>
    
    <prop key="driver">${jdbc.driverClassName}</prop>
    
    <prop key="url">${jdbc.url}</prop>
    
    <prop key="user">${jdbc.username}</prop>
    
    <prop key="password">${jdbc.password}</prop>
    
    </props>
    
    </property>
    
    </bean>
    
    </beans>
    i am just confused the kind of wiring the two beans have in between.
    please help

  2. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    I'm not quite sure I understand the question. The example you have posted is using setter injection and property placeholders.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Posting Permissions

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