我在我的系统中使用了lombok和JPA。所以对于实体类,它们看起来像:
@Getter
@Setter
@Entity
@NoArgsConstructor
@AllArgsConstructor
public class XxxEntity {
...
}
所以我的问题是,我可以创建一个自定义注释来分组这些所有这些注释吗?
所以它可能看起来像:
@CustomAnnotation
public class XxxEntity {
...
}
当我使用@CustomAnnotation时,它会将所有上述注释应用于该类。
这可能吗?
谢谢。