maven项目中 使用mybatis 出现 Invalid bound statement (not found) 错误原因之一

来源:互联网 发布:桌面美化软件 编辑:程序博客网 时间:2024/06/05 17:14
在做spring+mybatiss时,自动扫描都配置正确了,却在运行时出现了 Invalid bound statement (not found);这时需要确定项目启动之后 是否加载了 mybatis的xml,如果没有mybatis的xml,需在maven的pom文件中的<build>节点下加:
 
         <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>
这个配置并不是唯一的 还需要看项目的xml路径
有关 resources 的配置可以参考 http://www.cnblogs.com/pixy/p/4798089.html
0 0