Niu*_*ang 6 java spring annotations lombok spring-data-jpa
我在我的系统中使用 lombok 和 JPA。所以对于实体类,它们看起来都像:
@Getter
@Setter
@Entity
@NoArgsConstructor
@AllArgsConstructor
public class XxxEntity {
...
}
Run Code Online (Sandbox Code Playgroud)
所以我的问题是我可以创建一个自定义注释来对所有这些注释进行分组吗?
所以它可能看起来像:
@CustomAnnotation
public class XxxEntity {
...
}
Run Code Online (Sandbox Code Playgroud)
当我使用@CustomAnnotation 时,它会将上述所有注释应用于该类。
这可能吗?
谢谢。
| 归档时间: |
|
| 查看次数: |
1992 次 |
| 最近记录: |