One highlight of the Spring Framework is compatible with many data Access eg JDBC, Hibernate, iBatis
This tutorial show you for
How User Hibernate as Data Access for Spring FrameworkRequirement Tools 1.
JDK and Eclipse Editor (it 's common that we have)

2.
Hibernate .. Go to Google and Search with "Hibernate Download" to get it.
3.
Spring Framework ..I believe you know.but if it does not goto Google and Search "Spring Framework Download"
Remark :
Step Over ..is Common Reply this topic If you do not.

Remark :
Step Into ..I Will Show you in detail and Example.
Step 1 : Use Eclipse IDE to create Dynamic Web Application (
Step Over)
Step 2 : Import Hibernate Library and Spring Spring Framework to Project (
Step Over)
Step 3 : Build Hibernate Mapping Class with annotation (
Step Into)
Class Name Example.javapackage com.en.hibernate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* @author Somsuksri Kasemsuk
* @since 13-08-2011
*/
@Entity
@Table(name = "example")
public class Example implements java.io.Serializable {
private static final long serialVersionUID = -169364292963401081L;
@Id
@Column(name = "code_id")
private Integer codeId;
@Column(name = "tdesc")
private String tdesc;
@Column(name = "edesc")
private String edesc;
public Integer getCodeId() {
return codeId;
}
public void setCodeId(Integer codeId) {
this.codeId = codeId;
}
public String getTdesc() {
return tdesc;
}
public void setTdesc(String tdesc) {
this.tdesc = tdesc;
}
public String getEdesc() {
return edesc;
}
public void setEdesc(String edesc) {
this.edesc = edesc;
}
}
Step 4 : Create XML Configuration File (
Step Into)
hibernate.cfg.xml add it to classpath
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<mapping class="com.en.hibernate.Example"/>
</session-factory>
</hibernate-configuration>
Configuration Spring ContextdataAccesssContext-Hibernate.xml<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${db.hibernate.dialect}</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.default_batch_fetch_size">0</prop>
<prop key="hibernate.jdbc.batch_size">0</prop>
<prop key="hibernate.use_outer_join">true</prop>
<prop key="hibernate.max_fetch_depth">2</prop>
<prop key="hibernate.generate_statistics">true</prop>
</props>
</property>
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
<property name="lobHandler">
<bean class="org.springframework.jdbc.support.lob.DefaultLobHandler" />
</property>
</bean>
<bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
</beans>
Load it to Spring ContextWeb.xml <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/appcontext/datasource-service.xml
/WEB-INF/appcontext/dataAccesssContext-Hibernate.xml
</param-value>
</context-param>