从velocity 模板切换到thymeleaf 后, 默认模板位置为templates , 有时候静态资源方在该目录下会出现访问404错误spring
解决办法:mvc
application.properties 中添加:app
#dev toolsspring.devtools.livereload.enabled=true# 静态文件请求匹配方式spring.mvc.static-path-pattern=/**# 修改默认的静态寻址资源目录spring.resources.static-locations = classpath:/templates/,classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/