扩展使用Spring的元注释的龙目岛注解 [英] Extending a lombok annotation using Spring's meta-annotations
问题描述
我最近发现龙目岛,我喜欢它的使用带来的舒适性。世界上只有一个我很想念特别的事情。
I recently discovered lombok and I enjoy the comfort it's usage brings. There is only one particular thing I am missing.
所以,只是出于好奇:我怎么能扩展,它提供了一个额外的默认构造函数的类其所施加的方式 @AllArgsConstructor
注释
So just out of curiosity: How could I extend the @AllArgsConstructor
annotation in a way that it provides an additional default constructor to the class on which it is applied?
我想使用Spring 4.0的能力建设<一的href=\"http://docs.spring.io/spring/docs/4.0.1.RELEASE/spring-framework-reference/htmlsingle/#beans-meta-annotations\"相对=nofollow>注解组成的,但我必须承认我从来没有编程的自定义注解。所以,我真的不知道如何下手......
I was thinking of using Spring 4.0's capability to build composed annotations, but I must admit I never programmed a custom annotation before. So I don't really know how to start ...
有什么建议?
推荐答案
我不知道如何扩展注释,但如果你想添加一个默认的构造,可以加龙目@NoArgsConstructor注释。
I don't know how to extend the annotation, but if you want to add a default constructor, you can add the Lombok @NoArgsConstructor annotation.
这篇关于扩展使用Spring的元注释的龙目岛注解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!