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