spring 编译时抱错纪录class path resource [spring/] cannot be resolved to URL because it does not exist

class path resource [spring/] cannot be resolved to URL because it does not exist;

在 pom.xml 里添加如下代码

  1.  <build>
  2.     <finalName>ForestBlog</finalName>
  3.     <resources>
  4.       <resource>
  5.         <directory>src/main/java</directory>
  6.         <includes>
  7.           <include>**/*.properties</include>
  8.           <include>**/*.xml</include>
  9.         </includes>
  10.         <filtering>true</filtering>
  11.       </resource>
  12.     </resources
  13. </build>

如果还是不行,无法生成 mybatis和spring,以及那两个properties文件的情况,试试 clean (删除target),然后在启动 Tomcat。

猜你喜欢

转载自www.cnblogs.com/Amos-Turing/p/9302841.html
今日推荐