-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
optimize: support to obtain multiple configurations through a single key in Consul #3311
Conversation
# Conflicts: # config/seata-config-nacos/src/main/java/io/seata/config/nacos/NacosConfiguration.java
@a364176773 consul配置中心适配好了 |
Codecov Report
@@ Coverage Diff @@
## develop #3311 +/- ##
=============================================
- Coverage 51.56% 51.55% -0.02%
+ Complexity 3373 3372 -1
=============================================
Files 617 617
Lines 20438 20442 +4
Branches 2565 2565
=============================================
Hits 10538 10538
- Misses 8839 8842 +3
- Partials 1061 1062 +1
|
…nfig � Conflicts: � changes/1.5.0.md � script/server/config/registry.yml
@Rubbernecker Pls resolve conflicts. |
…nfig � Conflicts: � changes/1.5.0.md � changes/en-us/1.5.0.md � config/seata-config-consul/src/main/java/io/seata/config/consul/ConsulConfiguration.java � script/client/conf/registry.conf � script/server/config/registry.conf � script/server/config/registry.properties � script/server/config/registry.yml � seata-spring-autoconfigure/seata-spring-autoconfigure-core/src/main/java/io/seata/spring/boot/autoconfigure/properties/config/ConfigConsulProperties.java � server/src/main/resources/registry.conf
Codecov Report
@@ Coverage Diff @@
## develop #3311 +/- ##
=============================================
- Coverage 40.21% 40.21% -0.01%
+ Complexity 3083 3081 -2
=============================================
Files 690 690
Lines 23365 23369 +4
Branches 2893 2894 +1
=============================================
+ Hits 9396 9397 +1
- Misses 13095 13098 +3
Partials 874 874
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
请解决下冲突,进行合并 |
Ⅰ. Describe what this PR did
添加从consul单一key获取多条配置功能,registry.conf文件添加config.consul.key属性用于指定consul中的key。
Ⅱ. Does this pull request fix one issue?
#2506 #2316
Ⅲ. Why don't you add test cases (unit test/integration test)?
此功能在原有功能上修改,不方便写测试用例。
Ⅳ. Describe how to verify it
其他功能正常配置后,在registry.conf文件中将config.type设置为“consul”,添加config.consul.key属性,属性值为consul中的key,例如“seata.properties”,启动seata应用(server或client都可以),会自动拉取consul上“seata.properties”中的配置。
应用中的配置如下,根据项目选择对应的配置方式:
application.yml
registry.conf
consul中的属性配置如下:
Ⅴ. Special notes for reviews
将config.type设置为“consul”。
此功能已实现动态配置,同时兼容旧的配置方式。
seata-server也可以通过这种方式配置。