@SpringBootApplication cannot be resolved to a type In STS

Abdul :

I am very new to STS. I searched for this error in stackoverflow. I didn't find correct matching answer.

I am able to see the class in MavenDependencies seciton in STS but not able to add the annotation in my java class.

enter image description here Your help will be appriciated. Thanks

enter image description here

Foolish :

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.

Now go to eclipse Right click on project -> Maven -> Update Project.

This solved the problem for me.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=447605&siteId=1