title: Custom Annotation Is Not Picking by springboott
body: <p>I have created Custom Annotation in Spring-boot, But it is not recognizing. My custom annotation want some validation, But spring-boot not picking up that annotation. Here is my code</p>
  
  <pre><code>//creating custom annotation
  import javax.validation.Constraint;
  import javax.validation.Payload;
  import java.lang.annotation.*;
  
  @Retention(RetentionPolicy.RUNTIME)
  @Inherited
  @Target({ElementType.METHOD,ElementType.FIELD})
  @Documented
  
  @Constraint(validatedBy = Mobile_EmailValidation.class)
  public @interface CustomAnnotation {
      String message() /*default "Invalid phone number"*/;
      int min();
      Class&lt;?&gt;[] groups() default {};
      Class&lt;? extends Payload&gt;[] payload() default {};
  // for validation class
  
  public class  Mobile_EmailValidation implements ConstraintValidator&lt;CustomAnnotation, String&gt; {
  
      static{
          System.out.println("hi this is static block");
      }
  
  
      @Override
      public void initialize(CustomAnnotation constraintAnnotation) {
       System.out.println("hi this annotation works");
      }
  
      @Override
      public boolean isValid(String contactField,
                             ConstraintValidatorContext ctx) {
          System.out.println("hi this annotation works");
          if (contactField == null)
              return true;
  
          boolean isValid;
          if (contactField.length()&lt;10) {
              isValid = false;
          }
          else {
              isValid = true;
          }}
  
  //this is my entity class
  
  @Entity
  @Table(name = "user")
  public class User extends BaseDomain {
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
  
      @Column(name = "name", nullable = true, length = 40)
      private String name;
  
  
  @CustomAnnotation(message = "invalid messages",min=4)
  
  @Column(name = "email_id", unique = true, nullable = false, length = 100)
  private String emailId;
  </code></pre>
  
  <p>Please help me out this annotation is not executed.Tell me is there any extra configuration is required. Please help me out.</p>