后端升级到2.4.3版本
This commit is contained in:
+6
-6
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user