Invalid bound statement (not found)

springboot+mybatis项目运行时报错:Invalid bound statement (not found)

解决方法
首先:先查看xml映射文件中namespace是否正确,这里要设置为相对应的Mapper接口文件
Invalid bound statement (not found)_第1张图片

Invalid bound statement (not found)_第2张图片

第二,查看xml文件中的标签id是否与mapper接口中定义的方法名相同,以及resultType,parameterType配置的实体类是否正确
Invalid bound statement (not found)_第3张图片

Invalid bound statement (not found)_第4张图片

第三:检查配置文件是否指定xml文件路径
Invalid bound statement (not found)_第5张图片

第四:在target下查看是否有xml文件
Invalid bound statement (not found)_第6张图片
如果没有:Maven-clean-run

你可能感兴趣的:(后端,后端报错,mybatis,spring,boot,java)