• Brian Clozel's avatar
    Improve Spring Resource Handling support · dd561d15
    Brian Clozel authored
    This commit improves support of the Resource Handling features
    introduced in Spring Framework 4.1. Those features add new ways to
    resolve and transform static resources in applications.
    See [this blog
    post](https://spring.io/blog/2014/07/24/spring-framework-4-1-handling-static-web-resources)
    for more details.
    
    The `ResourceUrlEncodinFilter` is added for compatible template engines:
    Velocity and Thymeleaf. It assists them with rewriting the URLs of
    static resources when rendering templates.
    
    New keys are added in the `ResourceProperties` in order to configure
    the Resource Handling chain. `ResourceResolvers` and
    `ResourceTransformers` are registered accordingly in
    `WebMvcAutoConfiguration`.
    
    Here is an example of enabling a `ContentVersionStrategy` on all
    static resources, meaning their names will be changed for cache
    busting purposes by adding a content hash at the end of the file name.
    Like "/js/jquery.js -> /js/jquery-872ca6a9fdda9e2c1516a84cff5c3bc6.js".
    
    ```
    spring.resources.chain.enabled:true
    spring.resources.chain.strategy.content.enabled:true
    spring.resources.chain.strategy.content.paths:/**
    ```
    
    Closes gh-1604
    Closes gh-3123
    dd561d15
Name
Last commit
Last update
docs Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-tools Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
pom.xml Loading commit data...