티스토리 뷰
Troubleshooting
intelliJ overwrite build.gradle - build path for persistence.xml
Better than alone 2019. 6. 12. 15:26Web 프로젝트가 아닌 경우는 보통 resource 폴더 아래에 persistence.xml 파일이 있다.
persistence.xml 파일이 resource 폴더 아래에 있을때, 빌드된 엔티티 파일을 읽지 못하는 현상이 발생
해결방법1 : 관련된 클래스를 모두 persistence.xml 파일에 등록을 해야 함.
단점: 관련된 엔티티가 많을 수록 전부 등록해야 함.
해결방법2 : 빌드할 때 gradle 설정을 추가하여 output 경로를 classes 폴더 아래로 덮어 쓸 수 있도록 변경하면 정상적으로 엔티티 파일들을 읽을 수 있다!!
apply plugin: 'idea'
idea {
module {
inheritOutputDirs = false
outputDir = file("$buildDir/classes/java/main/")
testOutputDir = file("$buildDir/classes/java/test/")
}
}
참고 - Web 프로젝트 필드의 경우에는 jar로 빌드하기 때문에 위 설정을 적용하지 않아도 정상동작한다.
반응형
'Troubleshooting' 카테고리의 다른 글
check idle timeout in EC2 ( EC2 Idle time ) (0) | 2018.03.21 |
---|
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- Markdown Note
- Bruteforce
- backtracking
- 여러 파일 하나로 합치기
- anaconda2
- Excel
- Python
- minor GC
- 엑셀
- ICPC
- 인쇄열고정
- SecurityContextPersistenceFilter
- unreachable object
- DP
- type명령어
- graph traversals
- anaconda설치
- nbconvert
- 메모리제한
- Open ID Connect
- 이클립스메모리분석툴
- greedy
- 동시설치
- SecurityContextRepository
- ipynb
- dynamic programming
- 스도쿠
- 인쇄행고정
- Divide&Conquer
- Note App
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함