1- <?xml version =" 1.0" encoding =" UTF-8" ?>
2- <beans xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3- xmlns=" http://www.springframework.org/schema/beans"
4- xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd" >
1+ <beans xmlns =" http://www.springframework.org/schema/beans" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2+ xsi : schemaLocation =" http://www.springframework.org/schema/beans
3+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" >
54
6- <bean id =" exampleDAO" class =" com.baeldung.beaninjection.ExampleDAOBean" >
7- <constructor-arg index =" 0" type =" java.lang.String"
8- value=" Mandatory DAO Property X" />
9- </bean >
5+ <bean id =" userWithCI" class =" com.baeldung.beaninjectiontypes.constructorinjection.User" >
6+ <constructor-arg ref =" addressWithCI" />
7+ </bean >
108
11- <bean id =" anotherSampleDAO" class =" com.baeldung.beaninjection.AnotherSampleDAOBean" >
12- <constructor-arg index =" 0" type =" java.lang.String"
13- value=" Mandatory DAO Property Y" />
14- </bean >
9+ <bean id =" userWithSI" class =" com.baeldung.beaninjectiontypes.setterinjection.User" >
10+ <property name =" address" ref =" addressWithSI" />
11+ </bean >
1512
16- <bean id =" exampleService" class =" com.baeldung.beaninjection.ExampleServiceBean" >
17- <constructor-arg index =" 0" ref =" exampleDAO" />
18- <property name =" propertyX" value =" Some Service Property X" ></property >
19- <property name =" anotherSampleDAO" ref =" anotherSampleDAO" ></property >
20- </bean >
13+ <bean id =" addressWithCI" class =" com.baeldung.beaninjectiontypes.constructorinjection.Address" >
14+ <constructor-arg index =" 0" value =" California" ></constructor-arg >
15+ <constructor-arg index =" 1" value =" USA" ></constructor-arg >
16+ </bean >
17+
18+ <bean id =" addressWithSI" class =" com.baeldung.beaninjectiontypes.setterinjection.Address" >
19+ <property name =" city" value =" Washington D.C." ></property >
20+ <property name =" country" value =" USA" ></property >
21+ </bean >
2122
2223</beans >
0 commit comments