本文主要是介绍使用mybatis-plus框架:@Autowired报错Could not autowire. No beans of ‘XXX‘ type found,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
使用mybatis-plus框架,使用xxmapper报错:
解决办法是:在mapper中添加注解:
@Repository
@Mapper
也可以使用
@AutowiredSysRoleMenuService sysRoleMenuService;
替代
@AutowiredSysRoleMenuMapper sysRoleMenuMapper;
方法名不同,但效果一样。
这篇关于使用mybatis-plus框架:@Autowired报错Could not autowire. No beans of ‘XXX‘ type found的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!