Skip to content
Advertisement

package org.springframework.boot does not exist

I am trying to run a Small basic Spring boot program on my machine and I when I run clean compile (even before trying spring-boot:run) on maven I get the following Error :

JavaScript

Here is my Pom.xml :

JavaScript

And here is my java Class :

JavaScript

I tried many solutions I could find on internet, such as deleting the .m2 repository, adding different tags (version, fork,…) to the spring-boot-maven-plugin plugin which, I’m pretty sure, is the part causing the problem

Any suggestions ?

Advertisement

Answer

You have 0 compile dependencies, only test-compile dependencies defined, because you’ve commented out spring-boot-starter-data-jpa. Spring starter’s pull other dependencies in (including other starters) to create everything needed at compile time. Un-comment the spring-boot-starter-data-jpa dependency, and/or re-evaulate what dependencies you actually want.

Advertisement