Create a Java/or Dynamic Web project in eclipse.
Copy all the spring jar files from /dist/modules into your project’s lib folder and add these jar files to java build path.
Copy all the jar files (except commons-attributes-compiler.jar) from /lib/jakarta-commons into your project’s lib folder and add these jar files to java build path. (Without these libraries tomcat will complain the following Exception-
java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory)
Now you are all set to begin web development with Spring DAO layer.
Following I show how we can configure Datasource/and the beans that use datasource using applicationContext.xml. and also I will show you how we can call Database functions/stored procedures running on MS SQL Server.
Following is the applicationContext.xml, where you configure your beans, specify the database connection settings here in datasource bean definition.
Following is a simple java class that shows how to call a function and map input/output parameters -
Following is a simple java class that shows how to call a stored procedure and map input/output paremeters using a private inner class.
Following is a model object used by the above java class -
thats it..you have an application with DAO layer. You can use similiar approach in web applications, For standalone make sure you have applicationContext.xml in classpath. For web applications, have applicationContext.xml in WEB-INF folder and define a context parameter with name (contextConfigLocation) and value (/WEB-INF/applicationContext.xml)









