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:correct wrong property names in seata-spring-boot-starter. #2217

Merged
merged 17 commits into from
Feb 5, 2020
Merged

bugfix:correct wrong property names in seata-spring-boot-starter. #2217

merged 17 commits into from
Feb 5, 2020

Conversation

xingfudeshi
Copy link
Member

Ⅰ. Describe what this PR did

Corret wrong property names in seata-spring-boot-starter.

Ⅱ. Does this pull request fix one issue?

fixes #2114

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

I've done integration testing.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Jan 22, 2020

Codecov Report

Merging #2217 into develop will decrease coverage by 0.24%.
The diff coverage is 50%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #2217      +/-   ##
=============================================
- Coverage       54.2%   53.95%   -0.25%     
- Complexity      2623     2624       +1     
=============================================
  Files            489      489              
  Lines          15339    15340       +1     
  Branches        1750     1751       +1     
=============================================
- Hits            8314     8277      -37     
- Misses          6241     6282      +41     
+ Partials         784      781       -3
Impacted Files Coverage Δ Complexity Δ
.../rm/tcc/remoting/parser/DefaultRemotingParser.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...gure/provider/SpringBootConfigurationProvider.java 32.85% <100%> (ø) 9 <1> (ø) ⬇️
...o/seata/integration/http/AbstractHttpExecutor.java 53.7% <100%> (ø) 10 <0> (ø) ⬇️
.../java/io/seata/spring/util/TCCBeanParserUtils.java 45.23% <66.66%> (+1.33%) 8 <2> (ø) ⬇️
...eata/integration/motan/MotanTransactionFilter.java 57.14% <0%> (-10.72%) 7% <0%> (ø)
...ion/sofa/rpc/TransactionContextProviderFilter.java 50% <0%> (-10%) 7% <0%> (ø)
...obuf/convertor/BranchRegisterRequestConvertor.java 100% <0%> (ø) 3% <0%> (ø) ⬇️
...otobuf/convertor/BranchReportRequestConvertor.java 100% <0%> (ø) 3% <0%> (ø) ⬇️
...obuf/convertor/BranchRollbackRequestConvertor.java 100% <0%> (ø) 3% <0%> (ø) ⬇️
...java/io/seata/tm/api/DefaultGlobalTransaction.java 65.55% <0%> (-7.78%) 19% <0%> (ø)
... and 38 more

@xingfudeshi xingfudeshi added this to the 1.1.0 milestone Jan 22, 2020
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.

I think you need to modify the SpringBootConfigurationProvider#convertDataId, convert the configuration items - to Camel style configuration. This pr will conflict with #2182 .

@xingfudeshi
Copy link
Member Author

These changes correspond to the structure in file.conf, where each {} is a properties class.

@xingfudeshi
Copy link
Member Author

And the data id conversion is required only if the properties in the properties class are read.

@xingfudeshi
Copy link
Member Author

TestName and test-name are equivalent when reading a configuration item in spring boot.

@slievrly
Copy link
Member

Such as there is a seata. client. aaa-bbb properties of configuration items, you create a new ClientPro class reads seata. client prefix projected into aaaBbb attributes in class, this is no problem springboot automatically. However, the configuration used in our program is client.aaa-bbb, which intercepts the getConfig method through spring boot starter. First, the dataId is standardized. If there is no special processing, the requested dataId is changed into "seata.client. aaa-bbb". In this case if aaa-bbb doesn't do the camel formatting to reflect the above property class you can't find the aaa-bbb property, right? The class that exists is aaaBbb.

@xingfudeshi
Copy link
Member Author

Such as there is a seata. client. aaa-bbb properties of configuration items, you create a new ClientPro class reads seata. client prefix projected into aaaBbb attributes in class, this is no problem springboot automatically. However, the configuration used in our program is client.aaa-bbb, which intercepts the getConfig method through spring boot starter. First, the dataId is standardized. If there is no special processing, the requested dataId is changed into "seata.client. aaa-bbb". In this case if aaa-bbb doesn't do the camel formatting to reflect the above property class you can't find the aaa-bbb property, right? The class that exists is aaaBbb.

fixed.

@zjinlei zjinlei closed this Jan 24, 2020
@zjinlei zjinlei reopened this Jan 24, 2020
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
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.

LGTM

@xingfudeshi xingfudeshi merged commit b8a35d1 into apache:develop Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

将配置参数改为application.yml后的问题
6 participants