Problem Description:----------------------------------------
Class injection failed: When restarting the server after changing the code, the following error is reported
Cause: ---------------------------------------
1: The class name is wrong, 2: The package name is wrong
Among them: Most likely, the class name is not annotated with @Service
There are many ways to report this error
Mine is because the package name is wrong, so spring can't map it,,,,,,,,
Error creating bean with name 'itemController': Injection of autowired dependencies failed:
The second time I reported this error because I forgot to add the @Service annotation to the implementation class that inherited the interface
Solution:---------------------------------------
First, check whether the name is wrong, and then check whether all Service classes are annotated with @Service
Below I have also collected several possible reasons
https://blog.csdn.net/qq_31823265/article/details/53816663
https://blog.csdn.net/a411358606/article/details/54426424