Why would it be outside Spring's scope? Right now, I can define a request parameter like this and Spring knows that the parameter is not required (i.e. I don't need to specify
required = false
on
@RequestParam
):
@RequestParam code: Optional<String>
Shouldn't Spring similarly be able to apply the same logic to: