问题1,xxxImpl继承自Serviceimpl,启动工程时,提示No unique bean of type [com.baomidou....BaseMapper] is defined: expected single matching bean but found 8: [xxx1Mapper, xxx2Mapper, xxx3Mapper, ..... xxx8Mapper]
复制Serviceimpl的源码,取消baseMapper的autowired注解,同时在各xxxImpl中初始化各自mapper,启动不报错。
根据以上报错,处理方式是否合适正确。
当前使用版本(必填,否则不予处理)
mybatis-plus 2.0.5 mybatis 3.4.2 mybatis-spirng 1.3.1 spring3.0.7
该问题是如何引起的?(确定最新版也有问题再提!!!)
问题1,xxxImpl继承自Serviceimpl,启动工程时,提示No unique bean of type [com.baomidou....BaseMapper] is defined: expected single matching bean but found 8: [xxx1Mapper, xxx2Mapper, xxx3Mapper, ..... xxx8Mapper] 复制Serviceimpl的源码,取消baseMapper的autowired注解,同时在各xxxImpl中初始化各自mapper,启动不报错。 根据以上报错,处理方式是否合适正确。
基于没报错的工程运行,出现以下两个问题: 问题2,已配置@Tableid,调用selectById时提示Invalid bound statement (not found):xxx.xxx.xxxMapper.selectById 问题3,调用selectList时,提示Invalid bound statement (not found):xxx.xxx.xxxMapper.selectList
现象:在xxx1Mapper定义testGet,并在xml中编写相应sql,可正确返回结果
重现步骤(如果有就写完整)
报错信息