Solved because the configuration file settings in the project are unreasonable. When importing gradle, you cannot choose to read the configuration file of each module, otherwise it will be repeated.
First check whether the spring package under External Libraries is there. If there is still an error, add indexes again; if it still doesn’t work, it is better to add the spring jar package in your local maven repository as Global Libraries
In the dependencies of the module in the project structure, check if there are any spring-related packages (in your case, there should be none). If not, you can make it manually; if you use gradle, you can depend on spring-related packages in build.gradle, and then depend on spring-related packages in module.
Solved because the configuration file settings in the project are unreasonable. When importing gradle, you cannot choose to read the configuration file of each module, otherwise it will be repeated.
The spring package is not referenced, maybe the package version conflicts. It is recommended to redirect the package
The jar package is not imported correctly.
Configure the library in the project configuration
See the maker panel at a glance
First check whether the spring package under External Libraries is there. If there is still an error, add indexes again; if it still doesn’t work, it is better to add the spring jar package in your local maven repository as Global Libraries
Built with gradle? It is recommended to rewrite your build.gradle file and find all the Spring dependencies in mvnrepository.com
In the dependencies of the module in the project structure, check if there are any spring-related packages (in your case, there should be none). If not, you can make it manually; if you use gradle, you can depend on spring-related packages in build.gradle, and then depend on spring-related packages in module.