mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 17:48:25 +08:00
兼容非seata
This commit is contained in:
parent
f8efef2e18
commit
37a085c1be
@ -93,8 +93,9 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.seata</groupId>
|
<groupId>io.seata</groupId>
|
||||||
<artifactId>seata-spring-boot-starter</artifactId>
|
<artifactId>seata-rm-datasource</artifactId>
|
||||||
<version>1.5.2</version>
|
<version>1.7.0</version>
|
||||||
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
@ -82,7 +82,7 @@ public class MultiDataSourceAutoConfiguration {
|
|||||||
|
|
||||||
for (Map.Entry<String, Map<String, String>> entry : dataSourceProperties.entrySet()) {
|
for (Map.Entry<String, Map<String, String>> entry : dataSourceProperties.entrySet()) {
|
||||||
DataSource dataSource = new DataSourceBuilder(entry.getValue()).build();
|
DataSource dataSource = new DataSourceBuilder(entry.getValue()).build();
|
||||||
if (seataConfig.isEnable()){
|
if (seataConfig !=null &&seataConfig.isEnable()){
|
||||||
if (seataConfig.getSeataMode() ==SeataMode.XA){
|
if (seataConfig.getSeataMode() ==SeataMode.XA){
|
||||||
dataSource = new DataSourceProxyXA(dataSource);
|
dataSource = new DataSourceProxyXA(dataSource);
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user