整合SSM项目时报错:classpath resource [com/luner/mapping/] cannot be resolved to URL because it does not exist

参考http://blog.csdn.net/qinkang1993/article/details/57626434

解决办法:

war包里面缺少Mapper对应的xml文件,也就是没有把xml文件打包进去。解决办法是,在pom.xml文件中的build标签中添加如下代码,显示的强制将xml文件打到war包中:

 <!--  强制将xml文件打到war包中 s-->
        <resources>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>

 

posted @ 2017-09-22 16:03  Lo_jun  阅读(410)  评论(0)    收藏  举报