Solve the error that the symbol cannot be found under gradle
1. Problem description
When writing the code, I found that when compiling, I reported a symbol error that could not be found
This class is in the tools package under common. The server in the project depends on common. When I injected the AppealTool class into the server, I reported this error.
After inspection, it is found that the @Component annotation has been added to AppealTool
In the startup class, this class can also be scanned
It can be clicked through command+mouse click, which proves that there is no problem with the code logic. After multiple clean+build and invalidate caches/restart have no effect.
Two, the cause of the problem
Finally found that the project is dependent on the jar package to run, but I set it in the build.gradle of gradle
As a result, the project does not generate an executable jar package, so the package location cannot be found. At this time, change false to true
run successfully