Problems

2023-04-10 12:20:49:611 ERROR 9932 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field userMapper in com.xxx.service.impl.xxxServiceImpl required a bean of type 'com.xxx.mapper.xxxMapper' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.xxx.mapper.xxxMapper' in your configuration.


Process finished with exit code 1

Action:

Consider defining a bean of type ‘com.xxx.mapper.xxxMapper’ in your configuration.

Solution

注意springboot 与 mybatis 继承??需要在xxxMapper类上添加注解@Mapper

而不是使用的注解==@Repository==

注意一下吧,我不细心两次了呜呜~~~感谢阅读,点赞转发收藏再走吧嘻嘻~

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐