@Reference should support annotating on custom annotation class.
See original GitHub issuehi, 请问可以让@Reference
能够注解在自定义的注解上吗? 这样我们可以用自定义的注解来注入dubbo的服务.
比如我们想叫@DubboAutowired
, 里面已经设置了我们的默认想的一些值.
@DubboAutowired
通过Spring的@AliasFor
来把值传递给@Reference
, 所以效果上自定义注解和@Reference
一样.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Creating a Custom Annotation in Java - Baeldung
We're going to create three custom annotations with the goal of serializing an object into a JSON string. We'll use the first one...
Read more >Spring Custom annotation practical uses. | by Hameed Imran
Custom annotations solve the code smell problem. Refer (Code snippet 3). You can create a custom annotation with required annotations and ...
Read more >java - use of custom annotations - Stack Overflow
Three main reasons to use custom annotations are: To reduce the effort of writing code (a compile-time annotation processor generates code ...
Read more >A Annotation Reference
In this programming model, you create an annotated Java file to specify the shape and characteristics of the Web service.
Read more >Java Annotations | DigitalOcean
In java annotations tutorial, we will look into the following;. Built-in Java annotations; How to write Custom Annotation; Annotations usage ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, we have received your PR, i think that’s a reasonable enhancement. Do you think add a
ElementType.ANNOTATION
will solve this problem?@charpty @chickenlj 请教一下,在
ServiceAnnotationBeanPostProcessor.java
中是通过AnnotationUtils.findAnnotation(beanClass, Service.class);
获取的@Service
注解,那这里自定义的@DubboService
注解里的属性是怎么传递给@Service
的?我在 Provider 上只用
@DubboService
最后得到的 bean 并没有我配置的信息。