org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cs.zsl.mapper.Syste

1.使用SpringBoot+MyBaits组合,运行代码出现如下异常

出现的异常:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

是由于mapper的配置文件和它之间的编译没有通过


2.解决方法:在pom.xml中加入以下代码即可

(1)我的mapper

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cs.zsl.mapper.Syste

(2)在pom.xml中的build中加入以下代码

 

<resources>
<!--编译src/main/java目录下的xml文件-->
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>

如图:

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cs.zsl.mapper.Syste

发表评论

相关文章