update 升级 Spring-Cloud-Alibaba 2021.0.1.0 => 2021.0.4.0

2.X
疯狂的狮子li 2 years ago
parent 2b6eb08c07
commit dd84e0d519

@ -14,15 +14,11 @@
</description> </description>
<properties> <properties>
<spring-cloud-alibaba.version>2021.0.1.0</spring-cloud-alibaba.version> <spring-cloud-alibaba.version>2021.0.4.0</spring-cloud-alibaba.version>
<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
<sentinel.version>1.8.5</sentinel.version> <sentinel.version>1.8.5</sentinel.version>
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
<nacos.config.version>0.8.0</nacos.config.version>
<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
<flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
<nacos.client.version>2.0.2</nacos.client.version>
<seata.version>1.5.2</seata.version> <seata.version>1.5.2</seata.version>
<nacos.client.version>2.1.1</nacos.client.version>
<nacos.config.version>2.0.4</nacos.config.version>
<dubbo.version>3.1.0</dubbo.version> <dubbo.version>3.1.0</dubbo.version>
<spring.context.support.version>1.0.11</spring.context.support.version> <spring.context.support.version>1.0.11</spring.context.support.version>
</properties> </properties>
@ -107,47 +103,47 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.csp</groupId> <groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-dubbo-adapter</artifactId> <artifactId>sentinel-reactor-adapter</artifactId>
<version>${sentinel.version}</version> <version>${sentinel.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.csp</groupId> <groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-apache-dubbo-adapter</artifactId> <artifactId>sentinel-cluster-server-default</artifactId>
<version>${sentinel.version}</version> <version>${sentinel.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.csp</groupId> <groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-apache-dubbo3-adapter</artifactId> <artifactId>sentinel-cluster-client-default</artifactId>
<version>${sentinel.version}</version> <version>${sentinel.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.csp</groupId> <groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-reactor-adapter</artifactId> <artifactId>sentinel-spring-webflux-adapter</artifactId>
<version>${sentinel.version}</version> <version>${sentinel.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.csp</groupId> <groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-cluster-server-default</artifactId> <artifactId>sentinel-api-gateway-adapter-common</artifactId>
<version>${sentinel.version}</version> <version>${sentinel.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.csp</groupId> <groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-cluster-client-default</artifactId> <artifactId>sentinel-spring-webmvc-adapter</artifactId>
<version>${sentinel.version}</version> <version>${sentinel.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.csp</groupId> <groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-spring-webflux-adapter</artifactId> <artifactId>sentinel-dubbo-adapter</artifactId>
<version>${sentinel.version}</version> <version>${sentinel.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.csp</groupId> <groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-api-gateway-adapter-common</artifactId> <artifactId>sentinel-apache-dubbo-adapter</artifactId>
<version>${sentinel.version}</version> <version>${sentinel.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba.csp</groupId> <groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-spring-webmvc-adapter</artifactId> <artifactId>sentinel-apache-dubbo3-adapter</artifactId>
<version>${sentinel.version}</version> <version>${sentinel.version}</version>
</dependency> </dependency>
<dependency> <dependency>

@ -1,2 +0,0 @@
org.springframework.boot.env.EnvironmentPostProcessor=\
com.ruoyi.common.elasticsearch.config.ActuatorEnvironmentPostProcessor

@ -1,2 +0,0 @@
org.springframework.boot.env.EnvironmentPostProcessor=\
com.ruoyi.common.loadbalance.config.CustomEnvironmentPostProcessor

@ -1,39 +0,0 @@
package com.ruoyi.common.web.config;
import com.alibaba.cloud.nacos.ConditionalOnNacosDiscoveryEnabled;
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
import com.alibaba.cloud.nacos.NacosServiceManager;
import com.alibaba.cloud.nacos.discovery.NacosDiscoveryAutoConfiguration;
import com.alibaba.cloud.nacos.discovery.NacosDiscoveryClientConfiguration;
import com.alibaba.cloud.nacos.discovery.NacosWatch;
import com.ruoyi.common.web.nacos.CustomNacosWatch;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.cloud.client.ConditionalOnBlockingDiscoveryEnabled;
import org.springframework.cloud.client.ConditionalOnDiscoveryEnabled;
import org.springframework.context.annotation.Bean;
/**
* nacos Undertow
*
* @author Lion Li
*/
@ConditionalOnClass(NacosWatch.class)
@AutoConfiguration(
before = NacosDiscoveryClientConfiguration.class,
after = NacosDiscoveryAutoConfiguration.class
)
@ConditionalOnDiscoveryEnabled
@ConditionalOnBlockingDiscoveryEnabled
@ConditionalOnNacosDiscoveryEnabled
public class NacosConfig {
@Bean
@ConditionalOnProperty(value = "spring.cloud.nacos.discovery.watch.enabled", matchIfMissing = true)
public NacosWatch nacosWatch(NacosServiceManager nacosServiceManager,
NacosDiscoveryProperties nacosDiscoveryProperties) {
return new CustomNacosWatch(nacosServiceManager, nacosDiscoveryProperties);
}
}

@ -1,25 +0,0 @@
package com.ruoyi.common.web.nacos;
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
import com.alibaba.cloud.nacos.NacosServiceManager;
import com.alibaba.cloud.nacos.discovery.NacosWatch;
/**
* nacos
*
* @author Lion Li
*/
public class CustomNacosWatch extends NacosWatch {
public CustomNacosWatch(NacosServiceManager nacosServiceManager, NacosDiscoveryProperties properties) {
super(nacosServiceManager, properties);
}
/**
* Undertow
*/
@Override
public int getPhase() {
return Integer.MAX_VALUE;
}
}

@ -1,3 +1,2 @@
com.ruoyi.common.web.config.I18nConfig com.ruoyi.common.web.config.I18nConfig
com.ruoyi.common.web.config.UndertowConfig com.ruoyi.common.web.config.UndertowConfig
com.ruoyi.common.web.config.NacosConfig

@ -29,12 +29,6 @@
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency> </dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<!-- SpringBoot Actuator --> <!-- SpringBoot Actuator -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
@ -47,6 +41,11 @@
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-sentinel</artifactId>
</dependency>
<dependency> <dependency>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-log</artifactId> <artifactId>ruoyi-common-log</artifactId>

@ -29,12 +29,6 @@
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency> </dependency>
<!-- SpringCloud Alibaba Sentinel -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId> <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
@ -56,6 +50,11 @@
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-sentinel</artifactId>
</dependency>
<dependency> <dependency>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-security</artifactId> <artifactId>ruoyi-common-security</artifactId>

Loading…
Cancel
Save