提交 14b889e0 编写于 作者: zhouweidong's avatar zhouweidong

补充事务开关

上级 c2ba94d7
......@@ -3,12 +3,13 @@ TARGET=PSSYSTEM
</#ibiztemplate>
package ${pub.getPKGCodeName()}.config;
import com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@Configuration
@Import({SeataFeignClientAutoConfiguration.class})
<#if pub.isEnableGlobalTransaction?? && pub.isEnableGlobalTransaction()?? && pub.isEnableGlobalTransaction()==true>
@Import({com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration.class})
</#if>
public class DevBootAutoConfiguration {
}
......@@ -101,6 +101,7 @@ TARGET=PSSYSTEM
<artifactId>jobs-spring-boot-starter</artifactId>
</dependency>
<#if pub.isEnableGlobalTransaction?? && pub.isEnableGlobalTransaction()?? && pub.isEnableGlobalTransaction()==true>
<!-- 阿里seata分布式事务 -->
<dependency>
<groupId>io.seata</groupId>
......@@ -123,6 +124,7 @@ TARGET=PSSYSTEM
</exclusion>
</exclusions>
</dependency>
</#if>
</dependencies>
......
......@@ -300,6 +300,7 @@ TARGET=PSSYSTEM
<version>${r'${baomidou-jobs.version}'}</version>
</dependency>
<#if pub.isEnableGlobalTransaction?? && pub.isEnableGlobalTransaction()?? && pub.isEnableGlobalTransaction()==true>
<!-- 阿里seata分布式事务 -->
<dependency>
<groupId>io.seata</groupId>
......@@ -324,6 +325,7 @@ TARGET=PSSYSTEM
</exclusion>
</exclusions>
</dependency>
</#if>
</dependencies>
</dependencyManagement>
......
......@@ -18,9 +18,11 @@ import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
import org.springframework.context.annotation.Import;
<#if pub.isEnableGlobalTransaction?? && pub.isEnableGlobalTransaction()?? && pub.isEnableGlobalTransaction()==true>
@Import({
com.alibaba.cloud.seata.feign.SeataFeignClientAutoConfiguration.class,
})
</#if>
@Configuration
@ConditionalOnClass(${item.codeName}RestConfiguration.class)
@ConditionalOnWebApplication
......
......@@ -33,6 +33,7 @@ TARGET=PSSYSTEM
<scope>provided</scope>
</dependency>
<#if pub.isEnableGlobalTransaction?? && pub.isEnableGlobalTransaction()?? && pub.isEnableGlobalTransaction()==true>
<!-- 阿里seata分布式事务 -->
<dependency>
<groupId>io.seata</groupId>
......@@ -55,6 +56,7 @@ TARGET=PSSYSTEM
</exclusion>
</exclusions>
</dependency>
</#if>
</dependencies>
......
......@@ -295,6 +295,7 @@ server:
mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
min-response-size: 10240
<#if pub.isEnableGlobalTransaction?? && pub.isEnableGlobalTransaction()?? && pub.isEnableGlobalTransaction()==true>
seata:
enabled: ${seataEnable} #是否开启全局事务
application-id: ${sys.getName()} #服务标识
......@@ -311,6 +312,7 @@ seata:
namespace: ${nacosNamespace} #服务命名空间
userName: "${nacosUserName}" #用户名
password: "${nacosPassWord}" #密码
</#if>
<#macro singleDatasourceConfig>
datasource:
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册