Skip to content

Instantly share code, notes, and snippets.

@nikeshpathak
Last active November 4, 2017 12:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nikeshpathak/db25a0c62b17b98580438fcec5f0010a to your computer and use it in GitHub Desktop.
spring beans declaration
<?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-3.0.xsd">
<bean id="customerImpl" class="com.example.yamlbeanExample.Customer">
<property name="firstName">
<value>Rohit</value>
</property>
<property name="lastName">
<value>jain</value>
</property>
<property name="phone">
<value>203428304230</value>
</property>
<property name="address" ref="addressImpl"></property>
</bean>
<bean id="addressImpl" class="com.example.yamlbeanExample.Address">
<property name="address1">
<value>gyan nagar</value>
</property>
<property name="address2">
<value>sector 4</value>
</property>
<property name="pinCode">
<value>313001</value>
</property>
<property name="city">
<value>Pune</value>
</property>
<property name="state">
<value>Maharastra</value>
</property>
<property name="country" ref="countryImpl"></property>
</bean>
<bean id="countryImpl" class="com.example.yamlbeanExample.Country">
<property name="countryName">
<value>India</value>
</property>
<property name="countryCode">
<value>+91</value>
</property>
<property name="currency">
<value>INR</value>
</property>
</bean>
</beans>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment