静态资源配置

<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
在springboot中配了mapper中的xml文件后要添个filtering,这样才不会让js,css,html等静态文件编译不了

这是静态资源的配置
spring:
mvc:
static-path-pattern: /**
resources:
static-locations: classpath:/static,classpath:/templates
posted @ 2021-09-13 10:47  风吟雪  阅读(48)  评论(0编辑  收藏  举报