for example, demo2 comment:
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface Demo2 {
int max() default 100;
int min() default 1;
boolean isNotNull() default true;
}
now only the annotated attribute isNotNull is set in a field of the entity class
@Demo2(isNotNull = false)
private String sex;
so how do I get this property set in the annotation on this field? That is, as long as the property with the new value is set, the other properties that do not set the new value do not get it?