Consider defining a bean of type ‘com.my.bbs.dao.BBSUserMapper‘ in your configuration.

启动时IDEA控制台报错: APPLICATION FAILED TO START***************************Description:Field sysUserDao in com.iam

启动时IDEA控制台报错:

APPLICATION FAILED TO START
***************************
 
Description:
 
Field sysUserDao in com.iamapsycho.service.impl.SysUserServiceImpl required a bean of type 'com.iamapsycho.dao.SysUserDao' that could not be found.
 
 
Action:
 
 Consider defining a bean of type 'com.my.bbs.dao.BBSUserMapper' in your configuration.

错误的大概意思就是:

这个错误提示是因为在com.my.bbs.service.impl.BBSUserServiceImpl类中需要一个类型为com.my.bbs.dao.BBSUserMapper的bean,但是在Spring的配置中没有找到。

最简单的解决方案:

启动类上添加:@MapperScan(“对应代理类的包名”)【中间具体的填写什么内容,主要看你mapper层包名】

@MapperScan("com.my.bbs.dao")

重新启动程序!

解决完事!

发布者:admin,转转请注明出处:http://www.yc00.com/web/1738332854a4038309.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信