在eclipse没有问题,在IDEA 不能使用 提示这个错误
原因 idea 默认的maven打包 xml没有打包进去
解决方法:在pom.xml 种添加 排除xml 的配置
<build>
<finalName>ssm</finalName>
<!--配置Maven 对resource文件 过滤 -->
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</build>