You are on page 1of 4

<beans>

<bean id ="id1" class ="class_name">


<property name = "Variable" >
<value> Hello My first program </value>
</property>
</bean>
</beans>
--------------------------------------------<beans>
<bean id ="id1" class ="class_name">
<property name = "Variable_name" >
<bean class="Inner_classname"/>
</property>
</bean>
</beans>
---------------------------------<beans>
<bean id="id1" class="class1")
<property name = "var1")
<bean class="inner_class")
</property>
</bean>
<bean id="id2" class="class2")
<property name = "var1")
<bean class="inner_class")
</property>
</bean>
-------------------------------------<beans>
<bean id ="id1" class="class1">
<property name = "var1">
<ref local/parent/bean ="id3"/>
</property>
</bean>
<bean id ="id2" class="class2">
<property name = "var1">
<ref local/parent/bean ="id3"/>
</property>
</bean>
<bean id="id3" class="innerclass">
</bean>
</beans>
------------------ Collection -------------------<beans>
<bean id="id1" class="">
<property name ="collecton reference"
[1]
<set>
<value>1001</value>

<value>nitesh</value>
<ref> --> can also be include
</set>
ob.add("")
[2]
<List>
<value>1001</value>
<value>nitesh</value>
<ref> --> can also be include
</List>
ob.add("")
[3]
<map>
<entry key = "k1" value="1001"/>
<entry key = "k2" value="1002"/>
<entry key = "k3" value="1003"/>
</map>
ob.put("","")
[4]
<props>
<prop key="k1">1001</prop>
</props>
ob.put("","")
------------------ Constructor Injection ------------------<bean id="id1" class="">
<constructor-arg>
<value>welcome</value>
</constructor-arg>
</bean>
/********** Double constructor ***************/
<bean id="id1" class="">
<constructor-arg index = "0" value="welcome"/>
</constructor-arg>
</bean>
-----------------------*** AutoWiring *********---------<beans>
<bean id="id1" class="class_name" autowire="any 5 type"/>
<bean id="ob2" class="class_name2"/>
</beans>
[2] by type
no need to take "ob2" same name , can be tAKE ANY NAME
[3] constructor
constructor of class need
[4] Autodetect
if constructor then work according if not then by type it will work.
*********** Uesd for auto wiring ************
<beans>

<context : anotation-config/>

****************** Validation *********


<bean id ="id1" class="c_name" dependency-config="any four type">

**************** LIFE CYCLE **************


if we can to create own life cycle method
<bean id="id1" class="c_name" init-method="" destory-method="life2" >
****************** PART 21*****************
<DTD......>
<beans>
<bean id="id1" class="org.springframework.jdbc.datasource.drivermanagerdatasourc
e">
<property total 4 time
</property>
</bean>
<bean id ="id2" class="org.springframework.jdbc.core.JDBCtemplate">
<constructor-arg ref="id1"/>
</bean>
<bean id="id3" class="c_name">
<constructor-arg ref="id2"/>
</bean>
<beans>

********** JDBC PART 7 ***********


Two
1. connection
2. main class

****************** J2EE PART 1 ***********


<beans>
<bean id ="id1" class="task1"/>
<bean id ="id2" class="task2"/>
<bean id ="id3" class="org.springframework.schuedul.timer.ScheduledTimerTask">
<property name="delay" > ***before start thread
<value>5000</value>
</property>
<property name="period"> *** how much time run
</property>
<propertyname="timerTask"> *** for which task
<reg local="id1"/>
</bean>

Same for task 2


<bean org.springframework.schuedul.timer.timerfactorybean>
<property name = "scheduledTimertask">
<Lsit>
<value>id3</>
<>id4</>
</list>
<property>
</bean>
</beans>

You might also like