后端升级到2.4.3版本

This commit is contained in:
zer0Black
2022-02-24 12:59:12 +08:00
parent 995465984c
commit a9643ed428
129 changed files with 4169 additions and 5689 deletions
@@ -10,6 +10,6 @@ WORKDIR /jero-cloud-gateway
EXPOSE 9999
ADD ./target/jero-cloud-gateway-2.4.2.jar ./
ADD ./target/jero-cloud-gateway-2.4.3.jar ./
CMD java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jero-cloud-gateway-2.4.2.jar
CMD java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jero-cloud-gateway-2.4.3.jar
@@ -5,7 +5,7 @@
<parent>
<artifactId>jero-cloud-module</artifactId>
<groupId>com.jero.boot</groupId>
<version>2.4.2</version>
<version>2.4.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -22,11 +22,6 @@
</exclusion>
</exclusions>
</dependency>
<!--redis-->
<dependency>
<groupId>com.jero.boot</groupId>
<artifactId>jero-boot-starter-redis</artifactId>
</dependency>
<!-- spring-cloud网关-->
<dependency>
<groupId>org.springframework.cloud</groupId>
@@ -53,14 +53,14 @@ public class DynamicRouteLoader implements ApplicationEventPublisherAware {
private ConfigService configService;
private JeroRedisClient redisClient;
private RedisUtil redisUtil;
public DynamicRouteLoader(InMemoryRouteDefinitionRepository repository, DynamicRouteService dynamicRouteService, JeroRedisClient redisClient) {
public DynamicRouteLoader(InMemoryRouteDefinitionRepository repository, DynamicRouteService dynamicRouteService, RedisUtil redisUtil) {
this.repository = repository;
this.dynamicRouteService = dynamicRouteService;
this.redisClient = redisClient;
this.redisUtil = redisUtil;
}
@PostConstruct
@@ -132,10 +132,10 @@ public class DynamicRouteLoader implements ApplicationEventPublisherAware {
if (configService == null) {
log.warn("initConfigService fail");
}
String configInfo = redisClient.get("gateway_routes");
if (StringUtils.isNotBlank(configInfo)) {
Object configInfo = redisUtil.get("gateway_routes");
if (ObjectUtil.isNotEmpty(configInfo)) {
log.info("获取网关当前配置:\r\n{}", configInfo);
JSONArray array = JSON.parseArray(configInfo);
JSONArray array = JSON.parseArray(configInfo.toString());
try {
routes = getRoutesByJson(array);
} catch (URISyntaxException e) {