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

feature: support GlobalTransactionInterceptor expression #2568

Merged
merged 37 commits into from
Jul 19, 2021

Conversation

funky-eyes
Copy link
Contributor

@funky-eyes funky-eyes commented Apr 17, 2020

Ⅰ. Describe what this PR did

support aspect programming

Ⅱ. Does this pull request fix one issue?

fix #2563 #527

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

    @Bean
    public AspectTransactionalInterceptor aspectTransactionalInterceptor () {
        return new AspectTransactionalInterceptor();
    }

    @Bean
    public Advisor txAdviceAdvisor(AspectTransactionalInterceptor aspectTransactionalInterceptor ) {
        AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
        pointcut.setExpression(AOP_POINTCUT_EXPRESSION);
        return new DefaultPointcutAdvisor(pointcut, aspectTransactionalInterceptor);
    }

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Apr 17, 2020

Codecov Report

Merging #2568 into develop will decrease coverage by 0.03%.
The diff coverage is 1.75%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2568      +/-   ##
=============================================
- Coverage      50.86%   50.83%   -0.04%     
- Complexity      2811     2815       +4     
=============================================
  Files            557      560       +3     
  Lines          17905    17912       +7     
  Branches        2124     2112      -12     
=============================================
- Hits            9108     9106       -2     
- Misses          7930     7942      +12     
+ Partials         867      864       -3     
Impacted Files Coverage Δ Complexity Δ
...va/io/seata/spring/annotation/AtTransactional.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ta/spring/annotation/GlobalTransactionScanner.java 52.12% <ø> (ø) 17.00 <0.00> (ø)
.../interceptor/AtGlobalTransactionalInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ata/spring/annotation/HandleGlobalTransaction.java 1.69% <1.69%> (ø) 1.00 <1.00> (?)
...ng/interceptor/GlobalTransactionalInterceptor.java 23.52% <25.00%> (ø) 2.00 <1.00> (?)
...n/src/main/java/io/seata/common/util/IdWorker.java
...ore/src/main/java/io/seata/core/util/IdWorker.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
... and 5 more

@zjinlei zjinlei added this to the 1.3.0 milestone Apr 21, 2020
@yougecn
Copy link

yougecn commented May 8, 2020

本机采用切面集成at模式测试正常没有问题,测试服务器跑p跑了几个小时运行正常。

@l81893521 l81893521 added the module/spring spring module label May 20, 2020
@codecov-commenter
Copy link

codecov-commenter commented May 20, 2020

Codecov Report

Merging #2568 (36bbeda) into develop (0f92415) will increase coverage by 0.04%.
The diff coverage is 49.43%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2568      +/-   ##
=============================================
+ Coverage      40.71%   40.76%   +0.04%     
- Complexity      3042     3052      +10     
=============================================
  Files            679      681       +2     
  Lines          22779    22853      +74     
  Branches        2841     2842       +1     
=============================================
+ Hits            9275     9315      +40     
- Misses         12634    12667      +33     
- Partials         870      871       +1     
Impacted Files Coverage Δ
...ing/annotation/AspectTransactionalInterceptor.java 0.00% <0.00%> (ø)
...ta/spring/annotation/GlobalTransactionScanner.java 28.71% <0.00%> (ø)
...ing/annotation/GlobalTransactionalInterceptor.java 31.92% <51.72%> (+2.78%) ⬆️
...o/seata/spring/annotation/AspectTransactional.java 59.18% <59.18%> (ø)
...c/main/java/io/seata/config/FileConfiguration.java 44.25% <0.00%> (+1.14%) ⬆️

@funky-eyes funky-eyes closed this May 20, 2020
@funky-eyes funky-eyes reopened this May 20, 2020
@funky-eyes funky-eyes closed this Jun 3, 2020
@funky-eyes funky-eyes reopened this Jun 3, 2020
@l81893521 l81893521 removed this from the 1.3.0 milestone Jun 29, 2020
@funky-eyes funky-eyes requested a review from slievrly July 31, 2020 02:52
@wangliang181230 wangliang181230 added this to the 1.5.0 milestone Oct 29, 2020
@slievrly slievrly modified the milestones: 1.4.2, 1.5.0 Mar 29, 2021
@funky-eyes funky-eyes changed the title feature: support Aspect Oriented Programming in AT model feature: support GlobalTransactionInterceptor expression Jul 18, 2021
Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

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

AspectTransactionalInterceptor bean( configuration bean) is necessary to put it in seata-spring-boot-starter?

@slievrly
Copy link
Member

AspectTransactionalInterceptor bean( configuration bean) is necessary to put it in seata-spring-boot-starter?

ignore it. if AspectTransactionalInterceptor as a configuration bean, personalization of a pointcut can't be guaranteed.

Copy link
Member

@jsbxyyx jsbxyyx left a comment

Choose a reason for hiding this comment

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

LGTM

@funky-eyes funky-eyes added the type: feature Category issues or prs related to feature request. label Jul 19, 2021
@slievrly slievrly merged commit 273d717 into apache:develop Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/spring spring module type: feature Category issues or prs related to feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

期望seata支持类似spring事务管理、txlcn那种切面模式配置分布式事务及事务传播
10 participants