1. Problem
Copy your own project to the microservice as a module. The maven import is normal and the package exists, but the idea still reports an error.
2. Solution
Refresh the cache
This situation can be solved by refreshing the cache file --> Invalidate Caches /Restart. --> Invalidate and Restart
Problem location https://bbs.csdn.net/topics/392493786
Check the Module structure.
The reason for another error is that there is a problem with the project structure. File->Project Structure opens the project structure.
Check whether the source code path on the right side of the Module is correct. The red one is the path where the error is reported, and delete the repeatedly introduced source code path.