rookie-Spring

参数校验

javax.validation.constraints

JSR303/JSR-349 标准

@NotEmpty, @NotBlank, @NotNull

  • @NotEmpty

    The annotated element must not be null nor empty.
    Supported types are:
    CharSequence (length of character sequence is evaluated)
    Collection (collection size is evaluated)
    Map (map size is evaluated)
    Array (array length is evaluated)

  • @NotBlank

    The annotated element must not be null and must contain at least one non-whitespace character. Accepts CharSequence.

  • @NotNull

    The annotated element must not be null. Accepts any type


rookie-Spring
https://arloyee.github.io/2023/08/24/rookie-Spring/
作者
YaYee
发布于
2023年8月24日
许可协议