@SpringBootApplication无法解析为STS中的类型 [英] @SpringBootApplication cannot be resolved to a type In STS

查看:274
本文介绍了@SpringBootApplication无法解析为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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆