mavenintellij-ideapom.xml

Importing to IntelliJ - Error package org.springframework.boot does not exist


Dear Stackoverflow Community, I have the following problem with my spring boot starter application. I imported the starter project as a new maven project into IntelliJ. But IntelliJ does not find the dependencies I specified in the pom.

Image of my Application Class:

If I try to run the project I get the following error message.

Image of the Error Message:

I already tried everything from re-installing IntelliJ to re-importing the project or redownloading the dependencies. I simply dont know why IntelliJ doesn´t find the dependencies.

My pom.xml looks as following

Image of my pom.xml:

The first time I tried to edit the pom.xml it said to me "this file does not belong to the project". Maybe this might be one reason.

Running the whole thing with 'mvn install' or 'mvn clean verify' works.


Solution

  • Here is how my IntelliJ settings for spring boot application looks like

    Click open -> browse your workspace -> and select POM.xml file Click open -> browse your workspace -> and select POM.xml file

    Check this in your intelliJ settings Check this in your intelliJ settings

    Do this too [Settings --> Maven --> Importing]

    enter image description here