Is it possibile to set a default value to a @PathVariable in SpringMVC?
@RequestMapping(value = {"/core/organization/{pageNumber}", "/core/organization"} , method = RequestMethod.GET) public String list(@PathVariable Integer pageNumber, ModelMap modelMap) {
In this case. If I access the page without pageNumber I want to set a default value to 1.
Is that possible?
/core/organization
which internally calls thelist
method with the default value you want. – M. Deinum