title: How to setup Hibernate JPA in Spring-Boot project without Spring Data?
body: <p>I am quite new to Spring and have a task to create a multi-module project that needs to use Hibernate JPA and Spring-Boot (Spring Data JPA is not allowed for this project).</p>
  <p>I am using the PostgreSQL database and <code>org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final</code>.</p>
  <p>I added hibernate JPA and on its own, it works but I don't know how to configure it to work in my spring-boot project. And most examples use spring-data-jpa.</p>
  <p>I tried <code>@PersitenceContect</code> annotation for my EntityManager but that doesn't work.</p>
  <p>I also tried following this: <a href="https://allaroundjava.com/hibernate-jpa-spring-tutorial/" rel="nofollow noreferrer">https://allaroundjava.com/hibernate-jpa-spring-tutorial/</a>
  But maybe because of different databases or maybe smth else I couldn't get it to work.</p>
  <p>I <strong>solved</strong> this by following JPA configuration described in this question: <a href="https://stackoverflow.com/questions/58963183/spring-boot-hibernate-jpa-configuration-to-use-entitymanager?rq=1&amp;fbclid=IwAR0SuAGM_wii22Gp_7yt7Y3ODNgb8JvVFPMKKF3DvIKYxqGmqHjLJLshV5Y">Spring Boot + Hibernate JPA configuration to use EntityManager</a></p>