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

bugfix: fixed the inability to get some remote configurations #4432

Merged
merged 20 commits into from
Mar 8, 2022

Conversation

funky-eyes
Copy link
Contributor

  • I have registered the PR changes.

Ⅰ. Describe what this PR did

该bug会导致nacos等配置中心配置了store.mode=db,但是本地的openapi的实现类却用的file,除非在本地properties再配置上store.mode=db,否则不生效
而如果要通过nacos,需要先实例化fileconfiguration,而fileconfiguration会被springbootcglib代理,原先的实现用的是applicationcontext在bean加载后去findbean,而GenericApplicationListener的加载是非常早的,所以导致了configuration无法使用,特此需要改造使用ConfigurableEnvironment去读取配置,并转换

Ⅱ. Does this pull request fix one issue?

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

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@funky-eyes funky-eyes added this to the 1.5.0 milestone Mar 3, 2022
@funky-eyes funky-eyes added module/config config module module/seata-spring-boot-starter seata-spring-boot-starter module module/server server module type: bug Category issues or prs related to bug. labels Mar 3, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2022

Codecov Report

Merging #4432 (8307356) into develop (3d7a8b6) will increase coverage by 0.04%.
The diff coverage is 61.22%.

❗ Current head 8307356 differs from pull request most recent head 82367f8. Consider uploading reports for the commit 82367f8 to get more accurate results

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #4432      +/-   ##
=============================================
+ Coverage      48.32%   48.36%   +0.04%     
+ Complexity      3970     3960      -10     
=============================================
  Files            734      734              
  Lines          25300    25330      +30     
  Branches        3109     3115       +6     
=============================================
+ Hits           12225    12251      +26     
- Misses         11750    11756       +6     
+ Partials        1325     1323       -2     
Impacted Files Coverage Δ
...ommon/src/main/java/io/seata/common/Constants.java 100.00% <ø> (ø)
...configure/SeataClientEnvironmentPostProcessor.java 0.00% <0.00%> (ø)
...ta/spring/boot/autoconfigure/StarterConstants.java 100.00% <ø> (ø)
...configure/SeataServerEnvironmentPostProcessor.java 0.00% <0.00%> (ø)
...rc/main/java/io/seata/common/util/StringUtils.java 36.92% <52.38%> (+3.30%) ⬆️
...gure/provider/SpringBootConfigurationProvider.java 50.00% <65.38%> (+1.72%) ⬆️
...ava/io/seata/server/ServerApplicationListener.java 47.82% <87.50%> (+7.34%) ⬆️
...toconfigure/SeataCoreEnvironmentPostProcessor.java 96.42% <100.00%> (+0.59%) ⬆️
...very/registry/zk/ZookeeperRegisterServiceImpl.java 61.76% <0.00%> (+0.73%) ⬆️
... and 1 more

@funky-eyes
Copy link
Contributor Author

Copy link
Member

@xingfudeshi xingfudeshi 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
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

@funky-eyes funky-eyes merged commit 1ddde40 into apache:develop Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/config config module module/seata-spring-boot-starter seata-spring-boot-starter module module/server server module type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants