Invalid bound statement (not found)

xiaoxiao2021-02-28  78

使用MyBatis时,有时候出现莫名奇妙的 Invalid bound statement (not found)异常,如果所有配置都检查没什么问题,有一种情况就是你只要随便在xml中进行一个空格或者任意改动,再保存就能正常运行。这种情况,主要是Maven有时候无法把配置文件打包到war包里面。解决办法。在pom.xml中标签里面添加 <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> <resource> <directory>src/main/resources</directory> </resource> </resources> 即可

转载请注明原文地址: https://www.6miu.com/read-66198.html

最新回复(0)