-
Notifications
You must be signed in to change notification settings - Fork 1.7k
GH-2304: Fix SendTo on Interface Etc. #2305
New issue
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
Conversation
Resolves spring-projects#2304 `@SendTo` was only detected on the concrete listener method. Use `AnnotatedElementUtils.findMergedAnnotation()` instead. **cherry-pick to 2.9.x, 2.8.x**
I know the solution is simple and really re-aligned with what we have so far with Even if we can do this, it doesn't mean that it makes sense in the target projects. Thanks |
@artembilan hi, i have many kafka controllers with topic name depends on request type name. I try to write one abstract super controller with change annotation text in runtime by generic type. https://pastebin.com/mdqRTVS4 |
I see, @VovkaSOL . So, you hacking annotation attributes values via reflection based on the actual generic arguments from the specific implementation. I would say those actual generic arguments - Don't get me wrong - don't want to offend you: I perhaps would implement something similar just because it looks cool and smart and really very abstract too easy to extend. Another solution which does not require reflection hacks and extra generics support would be possible with Spring Integration and its dynamic flows support: https://docs.spring.io/spring-integration/docs/current/reference/html/dsl.html#java-dsl-runtime-flows. Thank you for sharing your experience! |
@artembilan thanks, i understand my code not most users case) |
... and cherry-picked to |
@VovkaSOL FYI, 2.8.7 is scheduled to be released next Tuesday. |
re. your "15 microservices": you know that |
wonderful, thanks 👍 |
Resolves #2304
@SendTo
was only detected on the concrete listener method.Use
AnnotatedElementUtils.findMergedAnnotation()
instead.cherry-pick to 2.9.x, 2.8.x