-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
[Dubbo-4693] fix EnableDubbo's alias problem (no effect though declared) #4895
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4895 +/- ##
===========================================
- Coverage 61.17% 61.1% -0.07%
+ Complexity 424 423 -1
===========================================
Files 919 919
Lines 37487 37489 +2
Branches 5461 5446 -15
===========================================
- Hits 22933 22909 -24
- Misses 12049 12070 +21
- Partials 2505 2510 +5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonjoo2010 would you mind to take a look at apache/dubbo-samples@7e25d4e? I cannot reproduce the issue.
Hi, luo Sorry for the latency. I think problem will occur when using spring-boot to initialize the project. But surely there is a limitation for this PR. |
You can reproduce it by adding a breakpoint on |
Update: Recently I just found some ways which will cause the inheriting alias fail but didn't dig the root cause (It maybe not important because we can't make everyone not to do it like this way):
Then the information will not be brought to referenced annotations. And It will also be reproduced by the pair of @configuration + @EnableAutoConfiguration. So I think it's a kind of SpringBoot issue. Just like the strange flow of asynchronized servlet in SpringBoot compared SpringMVC in container(standalone tomcat)[1]. Maybe we can't unify them into the same processing flow but to make some changes adapting for the special environment. You can make more tests in the repository provided in previous comment. |
|
Sorry, this PR will not be merged into, thus |
I am curious that is this treated a bug or just let users ignore it? (LOST of scanBasePackages) |
What is the purpose of the change
fix the issued prompted in #4693
Brief changelog
Use
AnnotatedElementUtils.findMergedAnnotation
to make inherited annotations'@AliasFor
take effects.Verifying this change
@EnableDubbo(scanBasePackages = "") should bring the property to
@EnableDubboConfig
Reference
https://docs.spring.io/spring/docs/4.2.0.RC3_to_4.2.0.RELEASE/Spring%20Framework%204.2.0.RELEASE/org/springframework/core/annotation/AliasFor.html
Follow this checklist to help us incorporate your contribution quickly and easily:
[Dubbo-XXX] Fix UnknownException when host config not exist #XXX
. Each commit in the pull request should have a meaningful subject line and body.mvn clean install -DskipTests=false
&mvn clean test-compile failsafe:integration-test
to make sure unit-test and integration-test pass.