I'm using Spring Framework and I want to get query string values in Controller
api/asset?param1=value¶m2=value
some parameters can be empty like this
api/asset?param1=value¶m2
Here is code for controller
@RequestMapping(value = "/api/assets", method = RequestMethod.GET)
public @ResponseBody String getAssetList(
@RequestParam("limit") int limit,
@RequestParam("offset") int offset
) {
}
I got it working when both parameters are given, but I cannot get values when one parameter is empty