Skip to content
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

Fixes #74: Support JDK-based proxy in Sentinel annotation support #111

Merged
merged 1 commit into from
Aug 31, 2018
Merged

Fixes #74: Support JDK-based proxy in Sentinel annotation support #111

merged 1 commit into from
Aug 31, 2018

Conversation

sczyh30
Copy link
Member

@sczyh30 sczyh30 commented Aug 30, 2018

Describe what this PR does / why we need it

Support JDK-based proxy in Sentinel annotation support. In Sentinel 0.1.1, JDK-based proxy is not supported because signature.getMethod returns the method of interface. So in some circumstances we need to get declared method.

Spring Boot 2.x uses cglib-based proxy by default, but Spring Boot 1.x uses JDK-based proxy by default, causing some problems.

Does this pull request fix one issue?

Fixes #74

Describe how you did it

See resolveMethod.

- The method from the signature will return the method of interface, so we need to resolve declared method in target class

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
@sczyh30 sczyh30 added the to-review To review label Aug 30, 2018
@sczyh30 sczyh30 added this to the 0.2.0 milestone Aug 30, 2018
@codecov-io
Copy link

Codecov Report

Merging #111 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #111   +/-   ##
=========================================
  Coverage     45.81%   45.81%           
  Complexity      556      556           
=========================================
  Files           114      114           
  Lines          3813     3813           
  Branches        531      531           
=========================================
  Hits           1747     1747           
  Misses         1855     1855           
  Partials        211      211

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2772f18...7a7943b. Read the comment docs.

Copy link
Contributor

@CarpenterLee CarpenterLee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sczyh30 sczyh30 merged commit 9164bb1 into alibaba:master Aug 31, 2018
@sczyh30 sczyh30 removed the to-review To review label Aug 31, 2018
sczyh30 added a commit that referenced this pull request Sep 19, 2018
- The method from the signature will return the method of interface, so we need to resolve declared method in target class

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Arlmls pushed a commit to Arlmls/Sentinel that referenced this pull request Jan 8, 2019
…#111)

- The method from the signature will return the method of interface, so we need to resolve declared method in target class

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong state for SentinelResource annotation
3 participants