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 server start with springboot and config with application.yaml #3009

Merged
merged 57 commits into from
May 20, 2021

Conversation

spilledyear
Copy link
Contributor

@spilledyear spilledyear commented Aug 12, 2020

fixes #2984

1、server端可以通过 springboot/脚本/java -jar 等方式正常启动
2、server端引用 seata-spring-autoconfigure-server 后可以正常读取到配置项
3、客户端引用 seata-spring-boot-starter 后可以正常读取到配置项

主要做了以下改造:
1、将 seata-spring-boot-starter 中和配置相关的内容提取出来,封装成单独的模块 seata-spring-autoconfigure

2、client和server端依赖的属性不同,因此将seata-spring-autoconfigure分成三个子模块: seata-spring-autoconfigure-clientseata-spring-autoconfigure-serverseata-spring-autoconfigure-coreseata-spring-autoconfigure-core表示一些通用属性,同时被seata-spring-autoconfigure-clientseata-spring-autoconfigure-server 引用

3、针对客户端:在seata-spring-boot-starter中引用seata-spring-autoconfigure-client

4、针对服务端:在seata-server中引用seata-spring-autoconfigure-server

@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2020

Codecov Report

Merging #3009 into develop will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3009      +/-   ##
=============================================
- Coverage      50.46%   50.44%   -0.03%     
+ Complexity      3111     3107       -4     
=============================================
  Files            593      594       +1     
  Lines          19571    19573       +2     
  Branches        2427     2427              
=============================================
- Hits            9876     9873       -3     
- Misses          8702     8705       +3     
- Partials         993      995       +2     
Impacted Files Coverage Δ Complexity Δ
.../autoconfigure/SeataProviderAutoConfiguration.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...ta/spring/boot/autoconfigure/StarterConstants.java 100.00% <ø> (ø) 1.00 <0.00> (?)
...boot/autoconfigure/properties/SeataProperties.java 45.16% <ø> (ø) 7.00 <0.00> (?)
...re/properties/SpringCloudAlibabaConfiguration.java 66.66% <ø> (ø) 5.00 <0.00> (?)
...utoconfigure/properties/client/LockProperties.java 53.84% <ø> (ø) 4.00 <0.00> (?)
...autoconfigure/properties/client/LogProperties.java 60.00% <ø> (ø) 2.00 <0.00> (?)
.../autoconfigure/properties/client/RmProperties.java 44.00% <ø> (ø) 5.00 <0.00> (?)
...configure/properties/client/ServiceProperties.java 54.54% <ø> (ø) 6.00 <0.00> (?)
...onfigure/properties/client/ShutdownProperties.java 60.00% <ø> (ø) 2.00 <0.00> (?)
...ure/properties/client/ThreadFactoryProperties.java 51.35% <ø> (ø) 10.00 <0.00> (?)
... and 25 more

@funky-eyes funky-eyes added Do Not Merge Do not merge into develop first-time contributor first-time contributor module/server server module labels Aug 12, 2020
@funky-eyes
Copy link
Contributor

resolve the conflict

@codecov-io
Copy link

codecov-io commented Oct 15, 2020

Codecov Report

Merging #3009 (6288c8d) into develop (b55d24b) will decrease coverage by 10.47%.
The diff coverage is 27.34%.

❗ Current head 6288c8d differs from pull request most recent head ca42869. Consider uploading reports for the commit ca42869 to get more accurate results
Impacted file tree graph

@@              Coverage Diff               @@
##             develop    #3009       +/-   ##
==============================================
- Coverage      52.15%   41.67%   -10.48%     
+ Complexity      3509     2883      -626     
==============================================
  Files            638      652       +14     
  Lines          21108    21332      +224     
  Branches        2613     2616        +3     
==============================================
- Hits           11009     8891     -2118     
- Misses          9014    11635     +2621     
+ Partials        1085      806      -279     
Impacted Files Coverage Δ Complexity Δ
.../io/seata/core/rpc/netty/NettyServerBootstrap.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...figure/SeataClientPropertiesAutoConfiguration.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...igure/properties/client/LoadBalanceProperties.java 55.55% <ø> (ø) 3.00 <0.00> (?)
...utoconfigure/properties/client/LockProperties.java 53.84% <ø> (ø) 4.00 <0.00> (?)
...autoconfigure/properties/client/LogProperties.java 60.00% <ø> (ø) 2.00 <0.00> (?)
.../autoconfigure/properties/client/RmProperties.java 45.94% <ø> (ø) 8.00 <0.00> (?)
...configure/properties/client/ServiceProperties.java 54.54% <ø> (ø) 6.00 <0.00> (?)
.../autoconfigure/properties/client/TmProperties.java 40.00% <ø> (ø) 4.00 <0.00> (?)
...gure/properties/client/UndoCompressProperties.java 30.76% <ø> (ø) 1.00 <0.00> (?)
...utoconfigure/properties/client/UndoProperties.java 47.05% <ø> (ø) 4.00 <0.00> (?)
... and 110 more

@funky-eyes funky-eyes removed the Do Not Merge Do not merge into develop label Oct 17, 2020
@funky-eyes funky-eyes changed the title make server to support srpingboot and config with application.yaml feature: make server to support srpingboot and config with application.yaml Oct 17, 2020
@funky-eyes funky-eyes added the type: feature Category issues or prs related to feature request. label Oct 17, 2020
@funky-eyes
Copy link
Contributor

resolve code conflicts

@wangliang181230
Copy link
Contributor

标题中的srping -> spring

@spilledyear spilledyear changed the title feature: make server to support srpingboot and config with application.yaml feature: make server to support springboot and config with application.yaml Oct 19, 2020
@spilledyear
Copy link
Contributor Author

标题中的srping -> spring

fixed

server/pom.xml Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented May 12, 2021

Codecov Report

Merging #3009 (af1652e) into develop (55dd55d) will decrease coverage by 10.19%.
The diff coverage is 27.65%.

Impacted file tree graph

@@              Coverage Diff               @@
##             develop    #3009       +/-   ##
==============================================
- Coverage      51.23%   41.03%   -10.20%     
+ Complexity      3569     2946      -623     
==============================================
  Files            645      659       +14     
  Lines          21814    22055      +241     
  Branches        2736     2736               
==============================================
- Hits           11176     9051     -2125     
- Misses          9499    12159     +2660     
+ Partials        1139      845      -294     
Impacted Files Coverage Δ Complexity Δ
.../io/seata/core/rpc/netty/NettyServerBootstrap.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...figure/SeataClientPropertiesAutoConfiguration.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...boot/autoconfigure/properties/SeataProperties.java 41.02% <ø> (ø) 7.00 <0.00> (?)
...re/properties/SpringCloudAlibabaConfiguration.java 66.66% <ø> (ø) 5.00 <0.00> (?)
...igure/properties/client/LoadBalanceProperties.java 55.55% <ø> (ø) 3.00 <0.00> (?)
...utoconfigure/properties/client/LockProperties.java 53.84% <ø> (ø) 4.00 <0.00> (?)
.../autoconfigure/properties/client/RmProperties.java 43.90% <ø> (ø) 8.00 <0.00> (?)
...configure/properties/client/ServiceProperties.java 54.54% <ø> (ø) 6.00 <0.00> (?)
.../autoconfigure/properties/client/TmProperties.java 37.93% <ø> (ø) 4.00 <0.00> (?)
...gure/properties/client/UndoCompressProperties.java 30.76% <ø> (ø) 1.00 <0.00> (?)
... and 112 more

Copy link
Contributor

@wangliang181230 wangliang181230 left a comment

Choose a reason for hiding this comment

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

LGTM, please modify 1.5.0.md

Copy link
Contributor

@l81893521 l81893521 left a comment

Choose a reason for hiding this comment

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

ignore this.

@funky-eyes funky-eyes added this to the 1.5.0 milestone May 20, 2021
@funky-eyes funky-eyes merged commit 9beea74 into apache:develop May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/server server module type: feature Category issues or prs related to feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

transform seata-server into spring-boot project
9 participants