dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

to support annotation attributes override for @Service and @Reference

Open dhchao11 opened this issue 7 years ago • 0 comments

at some cases, i want to define a new annotation class that is annotated with @Reference, and in the new class, i use AliasFor for attribute override, but it does not work. i want to pull a request and enhance this function.

the sample code is like this: i want to redefine the group name to n"dubbo"

`@Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD}) @Reference public @interface SelfDefineReference {

@AliasFor(annotation = Reference.class, attribute = "group")
String group() default "dubbo";

}`

dhchao11 avatar May 16 '19 05:05 dhchao11