June 2018
Intermediate to advanced
408 pages
11h 23m
English
As we know, JPA is not an implementation; it is the specification for persistence. The Hibernate framework follows all of the specifications, and it also has its own additional features. Using the JPA specification in an application enables us to easily switch the persistence provider later if needed.
To use Hibernate on its own requires SessionFactory, and to use Hibernate with JPA requires EntityManager. We are going to use JPA, and the following is the Spring Java-based Hibernate JPA configuration:
@Configuration@EnableTransactionManagement@PropertySource({ "classpath:persistence-hibernate.properties" })@ComponentScan({ "com.packt.springhighperformance.ch6.bankingapp" })public class PersistenceJPAConfig ...Read now
Unlock full access