admin管理员组文章数量:1414737
启动时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")
重新启动程序!
解决完事!
本文标签: TypeBeandefiningBBSConfiguration
版权声明:本文标题:Consider defining a bean of type ‘com.my.bbs.dao.BBSUserMapper‘ in your configuration. 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/biancheng/1738332855a2076366.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论