IDEA project configuration error: Error: Module not specified, maven project has no maven operation

IDEA project configuration error: Error: Module not specified, maven project has no maven operation

Error:Module not specified

insert image description here
The startup class that caused SpringBoot to fail to recognize the project.

wrong reason

insert image description here
This phenomenon is caused by the fact that the project cannot recognize Maven.

Solution

1. Re-import Maven
Maven -> Reload project
insert image description here
2. If there is no Maven here, enter the settings to set Maven.
insert image description here
Select the local Maven in the Maven home path column. (Try not to use the Maven that comes with the project, so that the project will report some inexplicable errors).
3. Clear the cache and restart
insert image description here
File -> Invalidate Caches, and wait for IDEA to restart.

Guess you like

Origin blog.csdn.net/HaveFun_Wine/article/details/117947111