简体   繁体   中英

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.

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?

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 ...

Any suggestions?

我不知道如何扩展注释,但是如果要添加默认构造函数,则可以添加Lombok @NoArgsConstructor注释。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM