Spring
ContextConfiguration cannot be resolved to a type 에러
dev_SiWoo
2022. 1. 19. 10:28
@ContextConfiguration(
locations = {"file:Deployed Resources/webapp/WEB-INF/spring/**/*.xml"})
위와 같은 코드를 작성이후
ContextConfiguration cannot be resolved to a type 에러가 발생했다.
spring-test dependency를 추가해주었는데도 계속오류가나고 spring-test의 버전을 바꾸어서 주입시켜도
계속 오류가 났다.
그런데 해결방법은 pom.xml에서 spring-test 라이브러리를 추가할 때
<scope>부분을 주석처리해주는 것이였다.