I am getting:
The value for annotation attribute RequestParam.defaultValue must be a constant expression
but I have declared MAX_LONG_AS_STRING as a constant (static final):
private static final String MAX_LONG_AS_STRING = Long.toString(Long.MAX_VALUE);
@RequestMapping(method = RequestMethod.GET)
public String spittles(@RequestParam(value = "max", defaultValue = MAX_LONG_AS_STRING) long max,
@RequestParam(value = "count", defaultValue = "20") int count,
Model model) {
model.addAttribute("spittleList", spittleRepository.findSpittles(Long.MAX_VALUE, 20));
return "spittles";
}