라이브러리&프레임워크/Spring
[Spring] Class<SpringJUnit4ClassRunner> cannot be resolved to a type / ContextConfiguration cannot be resolved to a type 에러
딸기맛도나쓰
2020. 12. 13. 01:48
- Spring을 공부하며 간단한 예제 작성 중, @RunWith 어노테이션의 인자값으로 준 SpringJUnit4ClassRunner.class에 Class<SpringJUnit4ClassRunner> cannot be resolved to a type 에러가 가 발생했다.
- 마찬가지로 @ContextConfiguration 어노테이션을 사용하니 ContextConfiguration cannot be resolved to a type에러가 발생했다.
해결 방법
- pom.xml에서 <scope> 부분을 주석 처리해주면 된다.