自定义了一个注解,因为一般这个注解都是和TableField(exist=false)搭配的,我就试试能不能和@RestController一样,一个注解当两个注解用,发现没效果。也可能是我不会用,或者有相同的issue已解决了,没找到
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Documented
@TableField
@JsonIgnore
@SQLCheck
public @interface ExtendField {
String value() default "extend";
@AliasFor(annotation = TableField.class)
boolean exist() default false;
}
Comment From: nieqiurong
3.5.6可以
Comment From: Yangqi0338
我把@TableField 写成 @TableField(exist = false) 才行。即不能通过@AliasFor来指定@TableField里面的参数,当然也可以用,一个疑问点。
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Documented
@TableField(exist = false)
@JsonIgnore
public @interface ExtendField {
String value() default "extend";
@AliasFor(annotation = TableField.class)
boolean exist() default false;
}
Comment From: huayanYu
嗯,就是这么用的