We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
目前查找Extension.class时使用的是AnnotationUtils.findAnnotation,推进使用 AnnotatedElementUtils.findMergedAnnotation。
修改后可以支持层级化的Annotation。 1、使用者可能自定义Annotion,如:
@retention(RetentionPolicy.RUNTIME) @target({ElementType.TYPE}) @extension @component public @interface MyExtension {
@AliasFor(attribute = "bizId",annotation = Extension.class) String bizId() default BizScenario.DEFAULT_BIZ_ID; @AliasFor(attribute = "useCase",annotation = Extension.class) String useCase() default BizScenario.DEFAULT_USE_CASE ; @AliasFor(attribute = "scenario",annotation = Extension.class) String scenario() default BizScenario.DEFAULT_SCENARIO;
}
2、在实际使用时,类似下面的使用场景:
@Myextension(bizId = "A") @component public class SomeExtensionA implements SomeExtPt
The text was updated successfully, but these errors were encountered:
No branches or pull requests
目前查找Extension.class时使用的是AnnotationUtils.findAnnotation,推进使用 AnnotatedElementUtils.findMergedAnnotation。
修改后可以支持层级化的Annotation。
1、使用者可能自定义Annotion,如:
@retention(RetentionPolicy.RUNTIME)
@target({ElementType.TYPE})
@extension
@component
public @interface MyExtension {
}
2、在实际使用时,类似下面的使用场景:
@Myextension(bizId = "A")
@component
public class SomeExtensionA implements SomeExtPt
The text was updated successfully, but these errors were encountered: