Use native JPA API Since Spring 3.0, Spring embrace JPA quickly, and JPA is the first class citizen in Spring core framework. And in the latest Spring, JPA support is improved and the usage of JPA is more friendly than Hibernate. Configuration An example of XML format configuration is shown below: <jdbc:embedded-database id="dataSource" > </jdbc:embedded-database> <bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" id="entityManagerFactory"> <property name="persistenceUnitName" value="persistenceUnit" /> <property name="dataSource" ref="dataSource" /> <property name="persistenceProviderClass" value="org.hibernate.ejb.HibernatePersistence"></property> <property name="packagesToScan"> <array> <value>com.hantsylabs.example.spring.model</value> ...