Common comments on spring
1. @ JsonInclude (Include.NON_NULL)
/ / place the tag on the attribute, and do not participate in serialization if the attribute is NULL
/ / if you put it on top of the class, it has an effect on all the properties of the class
/ / Include.Include.ALWAYS default
/ / Include.NON_DEFAULT attribute is default and not serialized
/ / the Include.NON_EMPTY attribute is empty ("") or NULL is not serialized.
/ / the Include.NON_NULL attribute is NULL and is not serialized
2. @ NotNull @ Length
@ NotNull (message = "user name cannot be empty")
@ Length (min=5, max=20, message= "user name length must be between 5-20")
@ Pattern (regexp = "^ [a murz Amurz ZZ]\\ w {4jue 19} $", message = "user name must begin with an alphanumeric underscore and can be composed of an alphanumeric underscore")
Private String username