통합테스트 과정에서 "package javax.persistence does not exist" 에러가 발생합니다.
2794
작성한 질문수 9
에러 코드 첨부합니다!
어떻게 해결할 수 있을까요? ㅠㅠ
C:\spring\pjt\hello-spring\hello-spring\src\main\java\hello\hellospring\domain\Member.java:4:25
java: package javax.persistence does not exist
C:\spring\pjt\hello-spring\hello-spring\src\main\java\hello\hellospring\domain\Member.java:5:25
java: package javax.persistence does not exist
C:\spring\pjt\hello-spring\hello-spring\src\main\java\hello\hellospring\domain\Member.java:6:25
java: package javax.persistence does not exist
C:\spring\pjt\hello-spring\hello-spring\src\main\java\hello\hellospring\domain\Member.java:7:25
java: package javax.persistence does not exist
C:\spring\pjt\hello-spring\hello-spring\src\main\java\hello\hellospring\domain\Member.java:9:2
java: cannot find symbol
symbol: class Entity
C:\spring\pjt\hello-spring\hello-spring\src\main\java\hello\hellospring\domain\Member.java:12:6
java: cannot find symbol
symbol: class Id
location: class hello.hellospring.domain.Member
C:\spring\pjt\hello-spring\hello-spring\src\main\java\hello\hellospring\domain\Member.java:12:10
java: cannot find symbol
symbol: class GeneratedValue
location: class hello.hellospring.domain.Member
C:\spring\pjt\hello-spring\hello-spring\src\main\java\hello\hellospring\domain\Member.java:12:36
java: cannot find symbol
symbol: variable GenerationType
location: class hello.hellospring.domain.Member
답변 6
0
확인해보았습니다. 저는 문제 없이 동작합니다. 코드 수정 일절 안했습니다.
-
프로젝트를 reload 해보시겠어요?
0
안되면 이 방법들도 있습니다. 1.이 안되면 2. 진행해보시고 결과 공유해주세요.
---
1.
먼저 프로젝트를 닫은 다음에
(File-Close Project)
File -> Open -> 해당 프로젝트의 build.gradle을 선택해주세요. 그 다음에 선택창이 뜨는데, Open as Project를 선택해주세요.
2. File - Invalidate Caches / Restart 클릭
0
https://drive.google.com/file/d/1ss_s87lJ0FhnzAPMNXy-Z5k2rgc2GFE2/view?usp=sharing
죄송합니다. 드라이브 사용이 처음이라 권한 설정을 누락했네요 ㅠ
설정 변경하여 다시 올렸습니다.
0
https://drive.google.com/file/d/1ss_s87lJ0FhnzAPMNXy-Z5k2rgc2GFE2/view?usp=sharing
입니다! 도움 주셔서 감사합니다.
0
안녕하세요. kt y님, 공식 서포터즈 OMG입니다.
https://bit.ly/3fX6ygx 에서 구글 드라이브 업로드 방법을 참고하신 후 링크를 댓글로 공유해주세요
감사합니다.
0
에러가 발생하는 Member.java 파일 코드 첨부합니다.
package hello.hellospring.domain;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Member {
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
public Long getId() {
return id;
}
public String getName() {
return name;
}
public void setId(Long id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
}
..
0
87
2
Unused property.....
0
105
2
project JDK is misconfigured
0
141
2
외부 API의 ID 타입(String/UUID)과 내부 도메인의 ID 타입(Long)이 불일치할 때의 설계 정석
0
86
2
단위/통합 테스트 버전충돌 문제
0
92
2
❗️springboot 4.0.2 버전 aspectj dependency 설정❗️
0
238
1
왜 컨트롤러는 변한게 없는데 새로 만든 html 파일이 뜨나요?
0
106
2
윈도우 build test오류 질문
1
105
2
테스트 관련 공부에 대한 조언을 얻고 싶습니다
0
103
2
테스트 실행 시 에러 질문
0
301
1
name을 통한 비교와 객체를 통한 비교
0
77
1
빌드 후 libs 없음
1
134
1
윈도우 gradlew.bat 에러
0
171
1
@PostMapping("/members/new")가 동작하지 않습니다
0
91
1
java static class와 kotlin class
0
83
1
스프링 DB연결
0
129
1
소요 시간
0
89
2
ddl.sql에 빨간 밑줄
1
102
2
welcome page 에러
0
187
3
잘 모르겠습니다.
0
164
2
fail을 똑같이 쳤는데 오류가 발생해요
0
161
2
index.html Welcome page
0
128
1
프로젝트 gradle-groovy ?
0
384
1
테스트코드 메서드명 한글
0
206
2





