之前遇到过SpringBoot 项目怎么都加载不到resources 下面的static下的文件和templates 文件。
编译出来,target下的classes文件没有显示static文件,mapper文件,templates文件。
发现是配置文件出现问题。
SpringBoot 无法识别 *.xml 和template 文件。
路径没加进去以至于SpringBoot没有识别文件。
解决方法:
在 pom.xml
配置文件
<build>
</build>
中加入如下配置
<build>
<resources>
<!-- 表示编译java源码时,包含src/main/java和src/