静态资源 静态资源 Spring Boot中不需要任何的配置即可直接访问静态资源,可以参考Spring Boot Static Content这个示范。 直接将你的资源文件放置在resources/static目录下即可,然后直接访问http://localhost:8080/css/style.css即可。 Spring 3.0.4以后版本提供了 <mvc:resources location="/resources/" mapping="/resources/**"/> 映射到ResourceHttpRequestHandler进行处理; 上一页 Thymeleaf 下一页 模板渲染