Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve VersionResourceResolver javadoc [SPR-14817] #19383

Closed
spring-projects-issues opened this issue Oct 17, 2016 · 2 comments
Closed

Improve VersionResourceResolver javadoc [SPR-14817] #19383

spring-projects-issues opened this issue Oct 17, 2016 · 2 comments
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 17, 2016

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

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 17, 2016

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.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Dec 13, 2016

Brian Clozel commented

Slava Semushin
Isn't there an example already in the reference doc?

@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.