@SpringBootApplication无法解析为STS中的类型 [英] @SpringBootApplication cannot be resolved to a type In STS
问题描述
我对STS非常陌生.我在stackoverflow中搜索此错误.我找不到正确的匹配答案.
I am very new to STS. I searched for this error in stackoverflow. I didn't find correct matching answer.
我能够在STS中看到MavenDependencies部分中的类,但是无法在我的Java类中添加注释.
I am able to see the class in MavenDependencies seciton in STS but not able to add the annotation in my java class.
您的帮助将得到帮助.谢谢
Your help will be appriciated. Thanks
推荐答案
转到您的maven存储库目录
对于路径下方的窗口
C:\Users\YourUser\.m2\repository\org\springframework\boot
然后删除spring-boot-autoconfigure
文件夹.
Go to your maven repository directory
For windows on below path
C:\Users\YourUser\.m2\repository\org\springframework\boot
Then delete spring-boot-autoconfigure
folder.
现在要蚀Right click on project -> Maven -> Update Project
.
这为我解决了问题.
这篇关于@SpringBootApplication无法解析为STS中的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!