When using Spring MVC, unlike other endpoints, controller and REST controller endpoints use Ant path matching
See original GitHub issueWhen we create WebMvcEndpointHandlerMapping we use the path pattern parser from the MVC auto-configuration:
However, when we create ControllerEndpointHandlerMapping, we don’t pass in a path pattern parser:
As a result, the default Ant-based path matching will be used. This feels inconsistent. However, there’s a risk that changing it will break users controller and rest controller endpoints if they have implementations that rely on some capabilities of the Ant-based matching that the path pattern parser doesn’t support. We may decide that we can’t do anything about this until 3.0.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
URL Matching with PathPattern in Spring MVC
In Spring applications AntPathMatcher is used to identify classpath, file system, remote, and other resources in Spring configuration. It has ...
Read more >Spring MVC URL Matching Improvements - Baeldung
Spring 5 brought a new PathPatternParser for parsing URI template patterns. This is an alternative to the previously used AntPathMatcher.
Read more >Spring MVC - URI Patterns - LogicBig
In this tutorial we will learn how many different kind of URI patterns can be used with ... Spring uses AntPathMatcher for pattern...
Read more >Difference between antMatcher and mvcMatcher
mvcMatcher(String mvcPattern) - Allows configuring the HttpSecurity to only be invoked when matching the provided Spring MVC pattern. Generally ...
Read more >Using the Spring @RequestMapping Annotation
@RequestMapping annotation is when used to map Spring MVC controller methods. Request Mapping Basics. In Spring MVC applications, the.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It’s #31700.
That doesn’t appear to be related to this issue which is specifically about request matching, not handler mapping beans. Please follow up on Stack Overflow or Gitter, but I think you’ll have to try to change
PSTraceFilterAutoConfiguration. You cannot assume that there will only be a singleRequestMappingHandlerMappingbean in the context. Spring MVC supports any number of them.