Skip to content

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

Closed
@BigMichi1

Description

@BigMichi1

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

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions