查了百度很久,看过很多博客文章终于在一位的文章上看到解决办法
参考文章:https://blog.youkuaiyun.com/ypp91zr/article/details/82713358
错误信息如下
Description:
Field userMapper in com.zhku.demo.service.UserServiceImpl required a bean of type 'com.zhku.demo.dao.UserMapper' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.zhku.demo.dao.UserMapper' in your configuration