All Downloads are FREE. Search and download functionalities are using the official Maven repository.

in.hocg.boot.validation.annotation.EnumRange Maven / Gradle / Ivy

package in.hocg.boot.validation.annotation;


import in.hocg.boot.validation.EnumRangeValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Created by hocgin on 2020/2/16.
 * email: [email protected]
 *
 * @author hocgin
 */
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE})
@Retention(RUNTIME)
@Constraint(validatedBy = EnumRangeValidator.class)
@Documented
public @interface EnumRange {

    String message() default "参数错误";

    Class[] enumClass() default {};

    Class[] groups() default {};

    Class[] payload() default {};
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy