Annotation Type NotNull


@Target(FIELD) @Retention(RUNTIME) public @interface NotNull
Annotation used to validate a string for nullability. For custom or stricter string controls, consider using the Pattern annotation instead. * Example usage: *
  * 
  * public class UserDto {
  *     @NotNull
  *     private String password;
  * }
  * 
  * 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • message

      String message
      Default:
      "Field must not be null"