ssm中整合Mybatis可以扫描到放在mapper下面的xml文件的方法

mybatis配置时出现org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

解决方法有两种:

1、把*Mapper.xml文件放到resource文件夹下管理

2、pom配置一下编译xml文件

        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </resource>
        </resources>

 

posted @ 2018-10-31 21:22  Kmily_Lee  阅读(3675)  评论(0编辑  收藏  举报