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

Simple URL Mapping not working with PathPatternParser when Servlet context path is used #26411

Closed
BigMichi1 opened this issue Jan 20, 2021 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@BigMichi1
Copy link

Affects: 5.3.3


when I use matching-strategy=path_pattern_parser instead of matching-strategy=ant_path_matcher my application is not able to resolve resources anymore.

I created this sample project here https://github.com/BigMichi1/spring-web-resource where you can see how the resource mapping is added: https://github.com/BigMichi1/spring-web-resource/blob/main/src/main/java/com/example/demo/CustomConfig.java

this works quite well until the path_patter_parser is used.

as one observation I had, was that when I remove server.servlet.context-path=/hello both strategies are working, but when setting the context path only the ant path matcher works

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 20, 2021
@bclozel bclozel self-assigned this Jan 21, 2021
@bclozel bclozel changed the title matching-strategy=path_pattern_parser does not resolve resources when context path is used Simple URL Mapping not working with PathPatternParser when Servlet context path is used Jan 21, 2021
@bclozel bclozel added type: bug A general bug in: web Issues in web modules (web, webmvc, webflux, websocket) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 21, 2021
@bclozel bclozel added this to the 5.3.4 milestone Jan 21, 2021
@spring-projects-issues spring-projects-issues added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.2.x labels Jan 21, 2021
@bclozel bclozel removed the status: backported An issue that has been backported to maintenance branches label Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants