mybatis invalid bound statement (not found)

Spring boot + Mybatis : Invalid bound statement (not found)

若是只在启动类上配置@MapperScan注解,默认只扫描和mapper接口同名的xml文件
若有mapper接口名字和xml名字不同的状况,需扫描任意名字的xml须要配置以下spring

#application.properties
mybatis.mapper-locations=classpath*:com/xx/xxx/*.xml

若是你不是这个问题 有使用maven的话,多是编译的时候xml资源没有打进来mybatis

enter image description here

相关文章
相关标签/搜索