The type org.springframework.context.ConfigurableApplicationContext cannot be resolved

参考文章 https://blog.csdn.net/q286035062/article/details/78473559

maven项目在写junit测试类时,加上@ContextConfiguration注解就在包名那报错

错误大约是这个样子

The type org.springframework.context.ConfigurableApplicationContext cannot be resolved.....

百思不得姐

在项目根目录下,也就是pom.xml所在目录 

 运行命令

mvn dependency:purge-local-repository

意思告诉maven:清除非本地库的依赖artifact文件,并重新加载它们

猜你喜欢

转载自blog.csdn.net/qq_24084605/article/details/82782218