차밍이
[Spring-boot] the import javax.persistence cannot be resolved 해결방법 본문
반응형
    
    
    
  목차
문제 상황
MySQL DB와 객체를 연결하려는 작업에서 @Entity annotation이 먹지 않는 문제가 발생했다.
import javax.persistence.Entity;을 통해서 import를 이미 해주었지만, 해당 import 부분 또한 에러가 발생하는 상황이다.
해결 방법
build.gradle에 들어가서 dependencies에 아래 내용을 추가해준다.
dependencies {
    compile('org.springframework.boot:spring-boot-starter-data-jpa')
    compile('mysql:mysql-connector-java')
}
반응형
    
    
    
  'Java > Spring' 카테고리의 다른 글
| [Spring-boot] Gradle Could not find method compile() 오류 해결 방법 (0) | 2022.07.20 | 
|---|---|
| [Spring-boot] VScode에서 Lombok 적용하기 (0) | 2022.07.19 | 
관련된 글 보기
								  Comments
								
							
						
					
                    
                
					
					
					
					
					
					
				