SpringBoot中html引用JS/CSS文件路径问题 html 文件放在resources/templates下,在Controller请求处理方法返回时会自动到这个目录下查找: js/css 等静态资源放在resources/static下,在html中引入时,会自动到这个目录下查找: java @RequestMapping("/index")publicStringindex
1.编写. spring boot拦截器 血战 Thymeleaf引入的static文件 SpringMVC去哪里找资源文件,默认的是/* * ,我们要改成/static/**在application.properties里面加上 大功告成 第二:那就是还用原来的方法,但是更改静态文件...渲染不成功,F12调试才发现是因为静态文件都被拦截器拦截了,于是就按照网上烂大街的方法:在拦...