question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@Reference should support annotating on custom annotation class.

See original GitHub issue

hi, 请问可以让@Reference能够注解在自定义的注解上吗? 这样我们可以用自定义的注解来注入dubbo的服务. 比如我们想叫@DubboAutowired, 里面已经设置了我们的默认想的一些值. @DubboAutowired通过Spring的@AliasFor来把值传递给@Reference, 所以效果上自定义注解和@Reference一样.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
chickenljcommented, Jan 30, 2018

Thanks, we have received your PR, i think that’s a reasonable enhancement. Do you think add a ElementType.ANNOTATION will solve this problem?

0reactions
wcp1231commented, Aug 28, 2018

@charpty @chickenlj 请教一下,在 ServiceAnnotationBeanPostProcessor.java 中是通过 AnnotationUtils.findAnnotation(beanClass, Service.class); 获取的 @Service 注解,那这里自定义的 @DubboService 注解里的属性是怎么传递给 @Service 的?

我在 Provider 上只用 @DubboService 最后得到的 bean 并没有我配置的信息。

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found