The type org.springframework.context.ConfigurableApplicationContext cannot be resolved問題解決


在搭建maven項目的時候,有時候會報這樣的問題。

The type org.springframework.context.ConfigurableApplicationContext cannot be resolved. It is indirectly referenced from required .class files - 
The method run(Object, String...) from thae type SpringApplication refers to the missing type ConfigurableApplicationContext

原因是:maven緩存被損壞了

問題的解決方案

1、到工程所在目錄,記住是有pom.xml的文件目錄

2、Shift+鼠標右鍵,打開命令窗口。

在命令行執行以下命令:

mvn dependency:purge-local-repository

 3、如果接收到生成成功消息,則意味着該錯誤已得到解決。

4、如果錯誤仍然存在,刪除你的 (~/.m2/repository/org/springframework) 文件夾然后執行命令

mvn package

問題解決


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM