码迷,mamicode.com
首页 > 移动开发 > 详细

运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.

时间:2019-10-25 09:43:07      阅读:4091      评论:0      收藏:0      [点我收藏+]

标签:red   上下   required   info   led   dao   failed   项目启动   nis   

运行springboot项目报错:

***************************

APPLICATION FAILED TO START

***************************

Description:

Field userMapper in com.whohim.springboot.service.impl.UserServiceImpl required a bean of type ‘com.whohim.springboot.dao.UserMapper‘ that could not be found.

Action:

Consider defining a bean of type ‘com.whohim.springboot.dao.UserMapper‘ in your configuration.

Process finished with exit code 0

在项目启动类加上下面注解即可(扫描对应的mapper包)

技术图片

 

运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.

标签:red   上下   required   info   led   dao   failed   项目启动   nis   

原文地址:https://www.cnblogs.com/share-record/p/11735931.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!