Consider this Spring MVC Controller:
@Controller
@RequestMapping("/test*")
public class TestController {
@RequestMapping(method = RequestMethod.GET)
public void doStuff(Model model){
...
}
@RequestMapping(params = "myParam")
public void doStuff(@RequestParam("myParam") int myParam, Model model){
...
}
}
When I put this into my browser:
mySite.com/test.html?myParam=1
I expected an AmbiguousHandlerMappingException or something, since both methods seem to match the URL.
But actually the first method got called. Does anybody know why?