사용자 도구

사이트 도구


java:jpa:entity

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
다음 판 양쪽 다음 판
java:jpa:entity [2020/07/05 10:29]
kwon37xi 만듦
java:jpa:entity [2020/07/05 10:31]
kwon37xi [Intellij DB 스키마로부터 JPA Entity 생성하기]
줄 5: 줄 5:
   * [[https://github.com/smartnews/jpa-entity-generator|smartnews/jpa-entity-generator: Lombok-wired JPA entity source code generator, Gradle and Maven supported.]]   * [[https://github.com/smartnews/jpa-entity-generator|smartnews/jpa-entity-generator: Lombok-wired JPA entity source code generator, Gradle and Maven supported.]]
   * [[https://www.eclipse.org/webtools/dali/docs/3.2/user_guide/tasks006.htm|Generating entities from tables]] Ecilpse   * [[https://www.eclipse.org/webtools/dali/docs/3.2/user_guide/tasks006.htm|Generating entities from tables]] Ecilpse
-  * [[https://mogamoya.tistory.com/entry/%ED%8C%81-intellij-database-schema-%EA%B8%B0%EB%B0%98%EC%9C%BC%EB%A1%9C-%EC%9D%BC%EA%B4%84-%EC%97%94%ED%8B%B0%ED%8B%B0-%ED%81%B4%EB%9E%98%EC%8A%A4-%EC%83%9D%EC%84%B1%ED%95%98%EA%B8%B0|[팁] intellij database schema 기반으로 일괄 엔티티 클래스 생성하기 :: 모가 모야]] 
-  * [[:intellij_idea|IntelliJ IDEA]]는 ''persistence.xml''이 추가되면 자동 생성옵션이 활성화 되지만 자유도가 떨어진다. 
  
 ==== Intellij DB 스키마로부터 JPA Entity 생성하기 ==== ==== Intellij DB 스키마로부터 JPA Entity 생성하기 ====
-  * +  * [[https://mogamoya.tistory.com/entry/%ED%8C%81-intellij-database-schema-%EA%B8%B0%EB%B0%98%EC%9C%BC%EB%A1%9C-%EC%9D%BC%EA%B4%84-%EC%97%94%ED%8B%B0%ED%8B%B0-%ED%81%B4%EB%9E%98%EC%8A%A4-%EC%83%9D%EC%84%B1%ED%95%98%EA%B8%B0|[팁] intellij database schema 기반으로 일괄 엔티티 클래스 생성하기 :: 모가 모야]] 
 +  * [[:intellij_idea|IntelliJ IDEA]]는 ''persistence.xml''이 추가되면 자동 생성옵션이 활성화 되지만 자유도가 떨어진다. 
 +  * [[:intellij_idea|IntelliJ IDEA]]에서 **Database** 연결을 생성하고 Table 을 우클릭하여, **Scripted Extensions** 에서 **Go To Scripts Directory** 를 실행한다. 
 +  * 해당 디렉토리에 [[https://gist.github.com/kwon37xi/404b075c2258e1df3ccbb04fdd0be525|Generate JPA Entities.groovy]] gist 소스를 복사해 넣는다. 
 +  * 이제 다시 **Scripted Extensions -> Generate JPA Entities.groovy** 를 선택하면 Entity 소스가 생성된다. 
 +  * [[java:lombok|Lombok]] 기반이므로 lombok 이 필요하다.
  
  
  
java/jpa/entity.txt · 마지막으로 수정됨: 2022/11/09 11:17 저자 kwon37xi