JeecgBoot2.4.3版本发布——企业级低代码平台

This commit is contained in:
zhangdaiscott
2021-03-17 18:43:42 +08:00
parent 47ea38038d
commit 76e7ee6c09
131 changed files with 3851 additions and 43841 deletions

View File

@ -10,6 +10,6 @@ WORKDIR /jeecg-cloud-gateway
EXPOSE 9999
ADD ./target/jeecg-cloud-gateway-2.4.2.jar ./
ADD ./target/jeecg-cloud-gateway-2.4.3.jar ./
CMD sleep 10;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-gateway-2.4.2.jar
CMD sleep 10;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-gateway-2.4.3.jar

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>jeecg-cloud-module</artifactId>
<groupId>org.jeecgframework.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>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-starter-redis</artifactId>
</dependency>
<!-- spring-cloud网关-->
<dependency>
<groupId>org.springframework.cloud</groupId>

View File

@ -3,6 +3,7 @@ package org.jeecg.config;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.handler.HystrixFallbackHandler;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;

View File

@ -1,8 +1,8 @@
package org.jeecg.handler;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.boot.starter.redis.listener.JeecgRedisListerer;
import org.jeecg.common.base.BaseMap;
import org.jeecg.common.modules.redis.listener.JeecgRedisListerer;
import org.jeecg.loader.DynamicRouteLoader;
import org.springframework.stereotype.Component;

View File

@ -11,7 +11,8 @@ import com.alibaba.nacos.api.exception.NacosException;
import com.google.common.collect.Lists;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.jeecg.boot.starter.redis.client.JeecgRedisClient;
import org.jeecg.common.modules.redis.client.JeecgRedisClient;
import org.jeecg.common.util.RedisUtil;
import org.jeecg.config.GatewayRoutersConfiguration;
import org.jeecg.config.RouterDataType;
import org.springframework.cloud.gateway.event.RefreshRoutesEvent;
@ -53,14 +54,14 @@ public class DynamicRouteLoader implements ApplicationEventPublisherAware {
private ConfigService configService;
private JeecgRedisClient redisClient;
private RedisUtil redisUtil;
public DynamicRouteLoader(InMemoryRouteDefinitionRepository repository, DynamicRouteService dynamicRouteService, JeecgRedisClient redisClient) {
public DynamicRouteLoader(InMemoryRouteDefinitionRepository repository, DynamicRouteService dynamicRouteService, RedisUtil redisUtil) {
this.repository = repository;
this.dynamicRouteService = dynamicRouteService;
this.redisClient = redisClient;
this.redisUtil = redisUtil;
}
@PostConstruct
@ -132,10 +133,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) {