Error:(10, 32) java: package org.springframework.http does not exist

@[TOC](Error:(10, 32) java: package org.springframework.http does not exist)

Problem Description

The original problem was only because there was a square bracket after the project module of IDEA, and the name inside was different from the module, so I became obsessive-compulsive and wanted to change it. Finally, it was changed.
The solution is to read this article

Cause Analysis and Solutions

Because there are square brackets after the name when IDEA creates a module, after I changed the name through one operation, I found that Error: (10, 32) java: package org.springframework.http does not exist and a bunch of problems that the package cannot be found up

But there is no obvious error reported in other places

Use File -> Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Runner -> Delegate IDE build/run actions to Maven
project can start.
But every time you start, you will see that maven is downloading the dependency package and then packaging it, every time. And it takes so much work to start a small test class?

Solution

Thinking of my Maven settings, I opened

File -> Settings -> Build, Execution, Deployment -> Build Tools -> Maven

At this time, I see that my settings look like this:
insert image description here

So reset Maven
insert image description here
and restart IDEA. After
setting, File -> Invalidate Caches... , then select Invalidate and Restart, restart IDEA, and finally reload Maven, the problem is solved!
insert image description here

Guess you like

Origin blog.csdn.net/qq_41704415/article/details/125457202