package javax.persistence does not exist 에러 해결방법

맹수연·2022년 5월 4일
0

Error 해결

목록 보기
2/2

스프링부트로 진행하는 프로젝트에서 JPA를 설계하기 위해 @Entity를 쳤는데 @EntityScan인가 이런 것만 뜨고 Entity는 뜨지 않고

package javax.persistence does not exist

이런 에러 메세지가 떠서 당황

intellij 우측 상단에 Gradle 눌러서 Tasks에서 bootjar도 해보고 다 했는데도 안됐는데 생각보다 간단한 문제였다.

build.gradle 파일에 dependencies에

    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'

이거 추가 필수!

아주 잘 된다~~

0개의 댓글