Is there a way to check the query parameter with spring without checking it in every function? For example, each method in the controller creates a list of elements, and each method accepts "from" and "to" parameters, so the check: from >=0 && to > 0 && from < to
I want to configure spring to return BAD_REQUEST or another state, as if it could not convert the string to an int parameter.
Thanks.
source share