Notice
Recent Posts
Recent Comments
Link
06-05 11:14
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
29 | 30 |
Tags
- spring자바설정
- Class<SpringJUnit4ClassRunner> cannot be resolved to a type
- 오라클연습문제
- 마크다운 링크
- 취성패
- 이클립스
- 마크다운 테이블
- HTTP 상태 415 – 지원되지 않는 Media Type
- @Setter(onMethod_ = @Autowired) Error
- SQL
- mysql한글깨짐
- git push
- 한글깨짐
- oracle
- 오라클
- Oracle join
- git
- 마크다운 리스트
- ejected-non-fast-forward
- git오류
- 마크다운 기본문법
- lombok.jar
- java
- java.lang.NoClassDefFoundError:org/springframework/core/annotation/MergedAnnotations
- 스프링
- SpringJUnit4ClassRunner
- 정보처리기사
- rest방식
- jdbc연결확인
- jdbc연결테스트코드
Archives
- Today
- Total
study-project
[오류]java.lang.NoClassDefFoundError: org/springframework/core/annotation/MergedAnnotations 본문
TIL/Spring
[오류]java.lang.NoClassDefFoundError: org/springframework/core/annotation/MergedAnnotations
귤식빵 2021. 2. 17. 21:02요즘 보는 책의 내용를 실습하는 도중에 junit 테스트 코드에 문제가 있는지
java.lang.NoClassDefFoundError:org/springframework/core/annotation/MergedAnnotations
이런 오류가 뜨면서 실행이 안되는것이다..
에러를 클릭하면
이런 창이 뜨는데 이걸 검색하면 제일 많이나오는게
buildpath에 junit를 제대로 등록하지 않아서 라고한다
근데 나는 이것도 소용없길래 pom.xml에 스프링 버전이랑 스프링 테스트 버전을 맞추니까 돌아갔다
1. 프로젝트 우클릭 - properties- java build path - libraries - addlibray
2. 그다음에 junit 선택
next를 누르면 junit 버전을 선택할 수 있다 맞는 버전을 선택하고 실행하면 된다
이건 junit 버전에 문제가 있있었던 사람이라면 이렇게 해결되었을것이고
이것도 안된다면 pom.xml을 한번 수정해봐야한다.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${org.springframework-version}</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${org.springframework-version}</version>
<scope>test</scope>
</dependency>
이런식으로 <version>${org.springframework-version}</version> 버전맞추기
'TIL > Spring' 카테고리의 다른 글
[오류]spring Logger cannot be resolved to a type 해결 (0) | 2021.02.23 |
---|---|
[오류]web.xml is missing and <failOnMissingWebXml> is set to true (0) | 2021.02.18 |
JDBC 연결확인을 위한 테스트 코드 (0) | 2021.02.17 |
[오류]Class<SpringJUnit4ClassRunner> cannot be resolved to a type (0) | 2021.02.17 |
@Setter(onMethod_ = @Autowired) 에러 해결하기 (0) | 2021.02.17 |
Comments