Project scenario: 【IDEA | @Autowired】Error: Could not autowire. No beans of 'xxx' type found.`
Problem Description
In the spring project of Idea, I often encounter the error message of Could not autowire. No beans of 'xxxx' type found
Receive data code in APP:
insert picture description here
Cause Analysis:
There may be two reasons, the first is the problem of IntellijIDEA's own tools. The second is the analysis caused by importing package errors when we import the @Service package:
1. Check the mapper class
2. Check Impl for @Servicez annotations
3. Check the xml
solution:
Check according to the steps of problem analysis, the problem can almost be solved