@NotNull @NotEmpty @NotBlank区别

@interface NotNull
The annotated element must not be {@code null}.
Accepts any type.
--------------------
@interface NotEmpty

* The annotated element must not be {@code null} nor empty. Supported types are:
* <ul>
* <li>{@code CharSequence} (length of character sequence is evaluated)</li>
* <li>{@code Collection} (collection size is evaluated)</li>
* <li>{@code Map} (map size is evaluated)</li>
* <li>Array (array length is evaluated)</li>
* </ul>
-------------------
@interface NotBlank

* The annotated element must not be {@code null} and must contain at least one
* non-whitespace character. Accepts {@code CharSequence}.




 

posted @ 2018-12-13 15:38  名著人士  阅读(619)  评论(0)    收藏  举报