Autowired加载Mapper类报错
在使用@Autowired加载MyBatis的接口的时候,会报错
1 | Could not autowire. No beans of "xxxMapper" type found |
是因为采用XML当作Mapper接口的实现,所以才会找不到 不用管它,程序能跑
Invalid bound statement (not found)
如果碰到以下报错
1 | Invalid bound statement (not found): com.company.project.dal.mapper.insert |
说明MyBatisSpring里Mapper扫描目录配置错了,去搜搜通配符