Improve VersionResourceResolver javadoc [SPR-14817] #19383
Closed
Comments
Slava Semushin commented Also I would like to have an example of using in in the documentation. Right now reference (http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/) only mentions FixedVersionStrategy. |
Brian Clozel commented Slava Semushin @Configuration
@EnableWebMvc
public class WebConfig extends WebMvcConfigurerAdapter {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**")
.addResourceLocations("/public-resources/")
.resourceChain(true).addResolver(
new VersionResourceResolver().addContentVersionStrategy("/**"));
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Brian Clozel opened SPR-14817 and commented
The
pathPatterns
arguments should be relative to the resource handling pattern, and not absolute to the whole application. The current javadoc does not explain that part.Affects: 4.3.4, 5.0 M3
The text was updated successfully, but these errors were encountered: