后端对前端参数校验(包括自定义注解)
1.@NotNull:不能为null,但可以为empty,用在基本类型上,Long,Integer,@NotEmpty:不能为null,而且长度必须大于0 ,用在集合类上面@NotBlank:只能作用在String上,不能为null,不能为 empty(or ""),而且调用trim()后,长度必须大于0 (使用的话,需要在controller层加上@Valid) @GetMapping(value = "/testValid") public St