[type:refactor] refactor shenyu-client-grpc
For #3932
Make sure that:
- [x] You have read the contribution guidelines.
- [x] You submit test cases (unit or integration tests) that back your changes.
- [x] Your local test passed
./mvnw clean install -Dmaven.javadoc.skip=true.
please check CI, https://github.com/apache/shenyu/actions/runs/3045035747/jobs/4906100161
Codecov Report
Merging #3937 (4a4a467) into master (3995940) will decrease coverage by
0.17%. The diff coverage isn/a.
@@ Coverage Diff @@
## master #3937 +/- ##
============================================
- Coverage 70.35% 70.18% -0.18%
+ Complexity 6748 6679 -69
============================================
Files 922 923 +1
Lines 25318 25081 -237
Branches 2297 2264 -33
============================================
- Hits 17813 17603 -210
+ Misses 6136 6112 -24
+ Partials 1369 1366 -3
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ter/client/grpc/ShenyuGrpcClientConfiguration.java | 100.00% <ø> (ø) |
|
| ...admin/listener/nacos/NacosDataChangedListener.java | 53.33% <0.00%> (-40.15%) |
:arrow_down: |
| .../apache/shenyu/plugin/sentinel/SentinelPlugin.java | 63.15% <0.00%> (-16.85%) |
:arrow_down: |
| ...gin/sentinel/fallback/SentinelFallbackHandler.java | 85.71% <0.00%> (-14.29%) |
:arrow_down: |
| ...min/listener/consul/ConsulDataChangedListener.java | 85.71% <0.00%> (-11.48%) |
:arrow_down: |
| .../shenyu/plugin/context/path/ContextPathPlugin.java | 84.37% <0.00%> (-9.38%) |
:arrow_down: |
| ...stener/zookeeper/ZookeeperDataChangedListener.java | 81.81% <0.00%> (-8.85%) |
:arrow_down: |
| ...u/plugin/modify/response/ModifyResponsePlugin.java | 10.16% <0.00%> (-8.48%) |
:arrow_down: |
| ...che/shenyu/sync/data/http/HttpSyncDataService.java | 85.71% <0.00%> (-4.09%) |
:arrow_down: |
| ...enyu/client/tars/TarsServiceBeanEventListener.java | 88.60% <0.00%> (-3.99%) |
:arrow_down: |
| ... and 16 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Thanks, I noticed, currently only testing as a draft.
I ran the version you modified and the master branch version. There is a problem when hande with /**, please fix it.
below is from master branch, /grpc/helloService/access$000 looks like a bug, it seems you had fixed it.

hi,@dragon-zhang, I have fixed the issue with helloService/**. And for access$000 it is because there is a place in the inner class to call the method of the outer class through the this reference of the outer class. The access$000 method is a method automatically generated by the compiler because the onError method of the anonymous inner class in the helloEveryOne method accesses the Log object of the outer class. And only when the annotation is on the class
Since there is no way to avoid business implementation, I think our solution may be as follows for correctness:
- Only configure the generation of non-static methods
- Generated only for public methods
I prefer 2, what you think?
hi,@dragon-zhang, I have fixed the issue with
helloService/**. And foraccess$000it is because there is a place in the inner class to call the method of the outer class through the this reference of the outer class. Theaccess$000method is a method automatically generated by the compiler because theonErrormethod of the anonymous inner class in thehelloEveryOnemethod accesses theLogobject of the outer class. And only when the annotation is on the class Since there is no way to avoid business implementation, I think our solution may be as follows for correctness:
- Only configure the generation of non-static methods
- Generated only for public methods
I prefer 2, what you think?
agree with you, just go ahead.
hi,@dragon-zhang, I have fixed the issue with
helloService/**. And foraccess$000it is because there is a place in the inner class to call the method of the outer class through the this reference of the outer class. Theaccess$000method is a method automatically generated by the compiler because theonErrormethod of the anonymous inner class in thehelloEveryOnemethod accesses theLogobject of the outer class. And only when the annotation is on the class Since there is no way to avoid business implementation, I think our solution may be as follows for correctness:
- Only configure the generation of non-static methods
- Generated only for public methods
I prefer 2, what you think?
agree with you, just go ahead.
Got it, You can review it, the current one is handled according to public.
Thanks for your contribution !