Long List of Query params / request parameters

http://dolszewski.com/spring/how-to-bind-requestparam-to-object/

“You also need to mark the POJO parameter in controller’s method with the @Valid annotation. This way you inform Spring that it should execute validation on the binding step.”

Downsides: are not able to map query param to a nice variable name in case the ones in URL are shortened (q instead of query), unless you specify a different getter.

Note

In many cases, it makes much more sense to use @NotBlack instead @NotNull as it also covers the undesired empty string problem (a string with the length of zero).