Empty @RequestMapping
method should match both "" and "/" consistently
#30293
Milestone
@RequestMapping
method should match both "" and "/" consistently
#30293
See spring-projects/spring-boot#33499 for initial report. It looks like the enhancement in #29625 was incomplete.
The goal was to make the following work for both
http://localhost:8080
andhttp://localhost:8080/
:But this use case doesn't work still, as the fix was focusing on the combining of
@RequestMapping
annotations. In the code snippet above,org.springframework.web.servlet.mvc.condition.PathPatternsRequestCondition#combine
is never called asorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#getMappingForMethod
will only call it if theRequestMappingInfo
is available on the type. Here, it's null so the combination never happens.#29625 did change the following, when the controller type itself is annotated with
@RequestMapping
.The text was updated successfully, but these errors were encountered: