Skip to content

Commit

Permalink
New Spring DI configuratoin.
Browse files Browse the repository at this point in the history
  • Loading branch information
yrojha4ever committed Jan 10, 2016
1 parent 00b8f6c commit e998146
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions SpringDi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'''
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean autowire="byName" class="di.constructorInjection.User" id="user">
<constructor-arg value="Buddha"/>
<constructor-arg value="30"/>
<constructor-arg value="Nepal"/>
<constructor-arg>
<list>
<value>Kathmandu</value>
<value>Dhangadi</value>
<value>Mahendranagar</value>
</list>
</constructor-arg>
</bean>


<bean class="di.setterInjection.Address" id="address">
<property name="city" value="KTM"/>
<property name="state" value="STATE"/>
<property name="zip" value="0977"/>
<property name="country" value="NEPAL"/>
</bean>

<bean class="di.setterInjection.UserDto" id="userSetterInjection">
<property value="Buddha(Gautam)" name="name"/>
<property value="30" name="age"/>
<property name="address" ref="address"/>
</bean>

</beans>


'''

0 comments on commit e998146

Please sign in to comment.