• 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
..
main Loading commit data...