shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

[ISSUE #3805] Add convenience annotation for tars

Open hezean opened this issue 3 years ago • 4 comments

Subtask of #3805

Make sure that:

  • [x] You have read the contribution guidelines.
  • [ ] You submit test cases (unit or integration tests) that back your changes.
  • [x] Your local test passed ./mvnw clean install -Dmaven.javadoc.skip=true.

hezean avatar Aug 29 '22 15:08 hezean

Hi, I think I'm getting some trouble that I've searched but cannot resolve without submitting another PR to TarsJava.

In Tars's SpringBootAppContext.class, it uses AnnotationUtils#getAnnotation to get the TarsServant annotation, which will return TarsServant{name = "", value = ""} instead the one with aliased value. It should be changed to use AnnotatedElementUtils#findMergedAnnotation, this won't break its original capability.

Should I submit a PR to TarsJava first? Any suggestions?

hezean avatar Aug 29 '22 15:08 hezean

Hi, I think I'm getting some trouble that I've searched but cannot resolve without submitting another PR to TarsJava.

In Tars's SpringBootAppContext.class, it uses AnnotationUtils#getAnnotation to get the TarsServant annotation, which will return TarsServant{name = "", value = ""} instead the one with aliased value. It should be changed to use AnnotatedElementUtils#findMergedAnnotation, this won't break its original capability.

Should I submit a PR to TarsJava first? Any suggestions?

I think so. Don't hesitate to submit PR to tars.

loongs-zhang avatar Aug 30 '22 03:08 loongs-zhang

Codecov Report

Merging #3891 (a6ec442) into master (a9ae18a) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #3891      +/-   ##
============================================
+ Coverage     69.59%   69.60%   +0.01%     
- Complexity     7350     7356       +6     
============================================
  Files           989      989              
  Lines         27797    27798       +1     
  Branches       2467     2467              
============================================
+ Hits          19345    19350       +5     
+ Misses         6982     6978       -4     
  Partials       1470     1470              
Impacted Files Coverage Δ
...enyu/client/tars/TarsServiceBeanEventListener.java 88.75% <100.00%> (+0.14%) :arrow_up:
...ruptor/RegisterClientServerDisruptorPublisher.java 64.70% <0.00%> (+11.76%) :arrow_up:
...controller/ShenyuClientHttpRegistryController.java 100.00% <0.00%> (+22.22%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Aug 30 '22 04:08 codecov-commenter

@HeZean please add wechat Z18179469818

loongs-zhang avatar Aug 31 '22 05:08 loongs-zhang

@HeZean TarsJava 1.7.3 has released, you can continue.

loongs-zhang avatar Nov 02 '22 10:11 loongs-zhang

too long time ,it be close.

yu199195 avatar May 06 '24 02:05 yu199195