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:add seata-spring-boot-starter #1742

Merged
merged 52 commits into from
Oct 28, 2019
Merged

feature:add seata-spring-boot-starter #1742

merged 52 commits into from
Oct 28, 2019

Conversation

xingfudeshi
Copy link
Member

@xingfudeshi xingfudeshi commented Oct 10, 2019

Ⅰ. Describe what this PR did

Support spring-boot auto configuration of Seata.

Ⅱ. Does this pull request fix one issue?

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

I've done integration test with spring-boot 2.1.4.RELEASE and spring-boot 1.5.22.RELEASE

Ⅳ. Describe how to verify it

If your project uses spring-boot, just add the following dependency to the pom.

<dependency>
      <groupId>io.seata</groupId>
      <artifactId>seata-spring-boot-starter</artifactId>
      <version>{seata.version}</version>
</dependency>

In your application.yml

seata:
  application-id: test
  tx-service-group: my_test_tx_group

Or application.properties

seata.application-id=test
seata.tx-service-group=my_test_tx_group

Other configurations have default values.

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented Oct 10, 2019

Codecov Report

Merging #1742 into develop will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #1742      +/-   ##
=============================================
+ Coverage      55.06%   55.08%   +0.02%     
  Complexity      2355     2355              
=============================================
  Files            421      421              
  Lines          14264    14264              
  Branches        1710     1710              
=============================================
+ Hits            7854     7858       +4     
+ Misses          5682     5680       -2     
+ Partials         728      726       -2
Impacted Files Coverage Δ Complexity Δ
...server/store/file/FileTransactionStoreManager.java 60.19% <0%> (+1.31%) 29% <0%> (ø) ⬇️

@xingfudeshi xingfudeshi added the type: feature Category issues or prs related to feature request. label Oct 10, 2019
@jsbxyyx
Copy link
Member

jsbxyyx commented Oct 17, 2019

please check *Properties default value has constants. if has constants then use the constants.

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.

Test pass. LGTM

@xingfudeshi
Copy link
Member Author

please check *Properties default value has constants. if has constants then use the constants.

sure.i will check.

Copy link
Contributor

@zjinlei zjinlei left a comment

Choose a reason for hiding this comment

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

LGTM

@zjinlei zjinlei merged commit 7c66b34 into apache:develop Oct 28, 2019
@@ -44,6 +44,7 @@
<module>tm</module>
<module>metrics</module>
<module>codec</module>
<module>seata-spring-boot-starter</module>
Copy link
Member

Choose a reason for hiding this comment

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

need with seata prefix?

*/
@ComponentScan(basePackages = "io.seata.spring.boot.autoconfigure.properties")
@ConditionalOnProperty(prefix = StarterConstants.SEATA_PREFIX, name = "enabled", matchIfMissing = true)
@ConditionalOnClass({DataSourceProxy.class})
Copy link
Member

Choose a reason for hiding this comment

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

if not contains AT mode.

* @date 2019/09/30
*/
@ComponentScan(basePackages = "io.seata.spring.boot.autoconfigure.properties")
@ConditionalOnProperty(prefix = StarterConstants.SEATA_PREFIX, name = "enabled", matchIfMissing = true)
Copy link
Member

Choose a reason for hiding this comment

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

check seata.enable value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Category issues or prs related to feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants