Hi,
I am new to
Struts and Spring, I have developed a small registration application in Struts and it is working fine :D . I have also started learning Spring 2.5 and completed till Spring
JDBC concept. I have succeeded in creating a standalone Spring JDBC main program which performs insert update and delete operations.
Now I want to remove all the boilerplate JBDC code from my Struts based registration application and integrate it with Spring JDBC.
Can someone please suggest me the right direction on how to implement this in Spring like how do I load the wiring information (beans.xml) into the application, how do i get the instance of the DAO Impl in the service object, what are the additional configurations I have to add in web.xml and struts-config.xml?
My beans.xml
***********
<beans>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"/>
<property name="username" value="ora1"/>
<property name="password" value="oracle"/>
</bean>
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="manageUserDAO" class="com.regis.dao.ManageUserDAOImpl">
<property name="jdbcTemplate" ref="jdbcTemplate"/>
</bean>
</beans>