Eclipse에서 Hibernate에서 기준 쿼리를 작성하는 동안 JPA 정적 메타모델 클래스를 사용하는 방법

When you use Maven you have to add in your POM following dependency:

<dependency> 
     <groupId>org.hibernate</groupId> 
     <artifactId>hibernate-jpamodelgen</artifactId> 
     <version>5.3.7.Final</version> 
</dependency>

Now you have to add folder target\generated-sources\annotations to your classpath as by default, the classes will be generated in this folder only. You go in

Project Build Path -> Configure Build Path -> Java Build Path -> Source and there make add folder

Now you can use the metamodel entity classes as User_ made from entity User

답장을 남겨주세요

다음과 같이 설계되었습니다. 워드프레스 | 개인 정보 보호 정책 | 나를 위한 | 블로그 지원