Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 624
Jan Kreischer Avatar asked Dec 20 '18 12:12

Jan Kreischer


People also ask

How do I install an existing spring boot project in IntelliJ?

From the main menu, select Run | Edit Configurations. Select the necessary Spring Boot run configuration to open its settings. Click Modify options. In the list that opens, point to On 'Update' action.

How run Mvn clean install in IntelliJ?

Click Run -> Edit Configurations -> Press + -> Search for "Maven" -> Locate "Command Line" field and enter in following maven commands "clean install" -> Press OK. Now click the green button to run that Run/Debug Configuration, this will maven clean install the module/project.


1 Answers

Try this and then build: mvn -U idea:idea

like image 66
wshow Avatar answered Sep 17 '22 20:09

wshow