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.