Posts

spring boot jpa

By default Spring uses  Hibernate  as the default JPA vendor. Although Hibernate is a good choice, some of us may prefer to use  EclipseLink  as it was supposed to be the reference implementation for the Java Persistence JSR. In this tutorial we will setup a Spring-Boot application to use EclipseLink with a PostgreSQL database, although it can be used with any other database. Fixing dependencies In order to use EclipseLink, we must remove Hibernate’s entity manager from the classpath in order to avoid problems. This is a matter of adding an exclusion to your application’s  Gradle  script or Maven’s pom.xml file. If you are using some other build tool this step won’t be necessary, or at least it will be different. 1 2 3 4 5 6 7 8 dependencies {      compile ( "org.springframework.boot:spring-boot-starter-web" )      compile ( "org.springframework.boot:spring-boot-starter-actuator" )      compile ( "org.springframework