[Error] 엔티티 인식 에러 해결
문제 자바 프로젝트에서 JPA에 대해 실습하던 도중 JPA가 Entity를 인식하지 못하는 문제가 발생하였습니다. hibernate와 h2 의존성도 잘 가져오고 persistence.xml도 참고하던 강의의 내용을 복사하였기에 잘 작성하였습니다. @Entity 어노테이션도 잘 작성하였지만 public class Main { public static void main(String[] args) { EntityManagerFactory emf = Persistence.createEntityManagerFactory("hello"); EntityManager em = emf.createEntityManager(); EntityTransaction tx = em.getTransaction(); tx.begin(..
Spring/Spring Data
2022. 7. 29. 14:43