tags: Hibernate, Spring Data JPA
Spring provides API to easily integrate Spring with ORM frameworks such as Hibernate, JPA(Java Persistence API), JDO(Java Data Objects), Oracle Toplink and iBATIS.
Advantage of ORM Frameworks with Spring
- Less coding is required: you don’t need to write extra codes before and after the actual database logic such as getting the connection, starting transaction, committing transaction, closing connection etc.
- Easy to test: Spring’s IoC approach makes it easy to test the application.
- Better exception handling: Spring framework provides its own API for exception handling with ORM framework.
- Integrated transaction management: By the help of Spring framework, we can wrap our mapping code with an explicit template wrapper class or AOP style method interceptor.