In Idea’s spring project, I often encounter the error message
Could not autowire. No beans of'xxxx' type found.
However, there is no problem with the compilation and operation of the program, and this error message will not have an impact. But the red error hints are more or less uncomfortable in the eyes of some programmers with obsessive-compulsive disorder.
There may be two reasons. The first is the problem of IntellijIDEA's own tools. The second one is caused by the import package error when we import the @Service
package.
For the first reason, the solution is: lower the level of Autowired detection, and change the level of Severity from the previous error to warning or other negligible levels.
Look at the solution: