本文主要是介绍No qualifying bean of type ‘com.example.book.mapper.BooksMapper‘ available: expected at least 1 bean,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
具体报错:
No qualifying bean of type 'com.example.book.mapper.BooksMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
翻译:
没有这个“com..xxMapper”类型的合格bean,可供mapper.xx映射器可用:希望至少有1个bean,它才可以作为自动连线
一般报这个错就是没配置好mapper的映射
根据报错找到 报错的mapper
加上
@Mapper 注解
重新启动
成功了
这篇关于No qualifying bean of type ‘com.example.book.mapper.BooksMapper‘ available: expected at least 1 bean的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!