Spring Framework is most famous java framework to build enterprise applications and database is integral part of enterprise applications. Spring framework provides excellent support for jdbc and other popular frameworks like hibernate, iBatis and many more. Here in this tutorial we will demonstrate example of CRUD operation using spring jdbc. …
Spring supports a shortcut for specifying the value of a simple type property.
In case of creating beans using setter method, we use below Spring configuration.
<bean id="school" class="com.code2succeed.core.school.School">
<property name="name" value="Code2Succeed"/>
<property name="noOfFaculties" value="100"/>
In Java programming language, it is common that one class contains reference of other class. This is said to be “HAS A relationship” in OOP.
Spring framework provides facility to inject one bean to another bean to achieve “HAS A” relationship.
The below example demonstrate dependency injection using setter method. …