add 整合 seata 1.4.2 对接 nacos 注册中心 配置中心

This commit is contained in:
疯狂的狮子li
2022-01-18 10:48:53 +08:00
parent d491e8d2fb
commit 0c2efd36cf
21 changed files with 245 additions and 112 deletions

View File

@@ -1,26 +0,0 @@
package com.ruoyi.common.datasource.env;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.env.EnvironmentPostProcessor;
import org.springframework.core.Ordered;
import org.springframework.core.env.ConfigurableEnvironment;
/**
* seata 在 springboot 2.6.x 存在循环引用问题的处理
*
* @author ruoyi
*/
public class ApplicationSeataInitializer implements EnvironmentPostProcessor, Ordered
{
@Override
public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application)
{
System.setProperty("spring.main.allow-circular-references", "true");
}
@Override
public int getOrder()
{
return Ordered.LOWEST_PRECEDENCE;
}
}

View File

@@ -1,2 +1 @@
org.springframework.boot.env.EnvironmentPostProcessor=\
com.ruoyi.common.datasource.env.ApplicationSeataInitializer
org.springframework.boot.env.EnvironmentPostProcessor=