譬如
@RequestMapping(value = "/getValue/{colorId}/{locationId}", method = RequestMethod.GET)
我希望可以有两种请求
1 /getValue/red/beijing
2 /getValue/red
而且当请求为 /getValue/red 的时候,类似于下面的判断生效
if(locationId == null){
dosomthing;
}
有这种操作吗?
RequestMapping的value支持多个的,是个数组