spring-mvc报红错误

can't resolve spring  以及运行测试案例报错 ‘无法找到路径’

 

解决办法是在pom文件里面重新配置 对应  resource

 

<resources>

<resource>

<directory>src/main/java</directory>

<includes> <include>**/*.properties</include>

<include>**/*.xml</include> </includes>

<filtering>false</filtering>

</resource>

由于修改了默认的resource目录,导致src/main/resources的所有文件都不能被扫描,因此还要配多一个

<resource>

<directory>src/main/resources</directory>

<includes>

<include>**/*.properties</include> <include>**/*.xml</include>

</includes>

<filtering>false</filtering>

</resource>

</resources>

posted @ 2017-07-14 08:53  NewIand  阅读(480)  评论(0编辑  收藏  举报