-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
defaultFallback
annotation attribute on class cause defaultFallback
handling conflicts on methods with different return types.
#3397
Comments
仔细分析了这个bug,不只是 class 级 annotation 会导致这个情况。
另外,因为类级别注解的查找、非 static 处理方法的查找还会跨继承关系查找,可能实际会有更复杂的冲突情况 |
Merged
插件 Alibaba Sentinel Annotation Support 版本已更新,对类注解提供了相关支持,同时对该bug情形进行了检查报错: Kapture.2024-05-23.at.16.04.07.mp4 |
dowenliu-xyz
added a commit
to dowenliu-xyz/Sentinel
that referenced
this issue
Jun 8, 2024
An spring-aop example that fits alibaba#3397 case is also provided: Run module sentinel-demo-annotation-spring-aop, and run following requests (in curl format) to verify that handlers won't conflict with each other. Once the module started, you can call requests in any sequence. curl -XGET localhost:19966/bar?t= curl -XGET localhost:19966/foo?t=-1 curl -XGET localhost:19966/count
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
Type: bug report
Describe what happened
The
defaultFallback
handling on methods with different return types is depend on calling order whendefaultFallback
is defined in annotation on class, like the issue #3386 .当
defaultFallback
由类上的注解定义时,不同返回值类型的方法的defaultFallback
处理结果与实际方法的被调用顺序相关,这和问题 #3386 类似。Describe what you expected to happen
The
defaultFallback
of each method of return type should be correctly handled.各类型方法的
defaultFallback
可以被正确的处理。How to reproduce it (as minimally and precisely as possible)
Minimium reproduce demo: https://github.com/dowenliu-xyz/sentinel-default-fallback-on-class-conflict/
SentinelResourceAspect
bean definition:Tell us your environment
MacOS 14.3
Temurin 17.0.10
Gradle wrapper 8.7
Anything else we need to know?
Additionally, I really don't understand what the design intent is and what the usage scenarios are for supporting annotations at the class level.
另外,我实在不明白在类级别支持注解是什么设计意图、有什么使用场景。
The text was updated successfully, but these errors were encountered: