Closed
Description
Issue:
Created 2 mappings as following in the controller, code is in Controller .java
of the attached project.
@GetMapping("/foo/**")
public ResponseEntity getFoo() {}
@GetMapping("/foo/**/bar")
public ResponseEntity getFooBar() {}
- In
webmvc
whenever request comes as/foo/1/2/3/bar
(as far as last path segment
isbar
) it maps togetFooBar
. - If
bar
is not specified ast last path segment then it maps togetFoo
. i.e allfoo/1
,foo/1/2
,foo/ab/cd
.... maps togetFoo
. - The issue is in webflux, when I switch to
webflux
all mappings map to
getFoo
. No matter if path consists ofbar
in the last path segment. - For eg.
/foo/ab/cd/bar
maps togetFoo
instead ofgetFooBar
.
Uploaded the project here , to switch between
webflux
andwebmvc
please comment out
appropriate starter dependency inpom.xml
.
Repro project here : https://github.com/kaladhar-mummadi/demo-issue
Notes:
- Webmvc AntPathMatcherTests has tests like
/bla/**/bla
, which are not covered in
PathPatternTests of WebFlux.