一、问题描述
使用MyBatis-Plus代码自动生成工具生成代码,目录接口如下:
在测试时发现,使用BaseMapper中的方法可以正常使用,而在接口中自定义的方法则会报错,报错信息如下
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.etc.li.mapper.TClassAttendanceMapper.getAll
经过仔细确认namespace的路径没错,方法的id没错,但在测试时一直报上述错误
二、解决办法
将xml文件移到resources/mapper文件夹下 ,并在yml配置文件中配置mapper-locations