MockMvc doesn't honor params in RequestMapping when no equal sign [SPR-15831] #20386
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
spring-projects-issues commentedJul 29, 2017
Jean-Baptiste Nizet opened SPR-15831 and commented
When two resource methods are defined as following:
and a MockMvc test tries executing the second method using
then the first method is invoked instead. Adding an equal sign at the end fixes the issue, but the equl sign shouldn't be necessary. BTW, in production, sending a request to /api/bug?foo does invoke the second method as expected.
Here's a repro project: https://github.com/jnizet/param-bug-demo
Note that the original bug has been detected in a Spring Boot 2.0.0.M2 project, so the bug is still there in the latest version of Spring.
Affects: 4.3.10, 5.0 RC3
Referenced from: commits 4fc0ce1
The text was updated successfully, but these errors were encountered: