【Untitled】Could not autowire. No beans of 'xxx' type found.

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
insert image 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
insert image description here
2. Check Impl for @Servicez annotations
insert image description here
3. Check the xml
insert image description here


solution:

Check according to the steps of problem analysis, the problem can almost be solved
insert image description here

Guess you like

Origin blog.csdn.net/weixin_60249074/article/details/124250670