|
|
|
@ -398,6 +398,7 @@ public class GatewayConsulRepo {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (groupApiResult != null) {
|
|
|
|
|
for (GroupApi groupApi : groupApiResult.getResult()) {
|
|
|
|
|
GroupContext groupContext = groups.get(groupApi.getGroupId());
|
|
|
|
|
if (groupContext == null) {
|
|
|
|
@ -423,6 +424,7 @@ public class GatewayConsulRepo {
|
|
|
|
|
}
|
|
|
|
|
groupContext.getRoutes().add(contextRoute);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (pathWildcardResult != null && pathWildcardResult.getResult() != null) {
|
|
|
|
|
for (PathWildcardRule wildcardRule : pathWildcardResult.getResult()) {
|
|
|
|
@ -446,7 +448,7 @@ public class GatewayConsulRepo {
|
|
|
|
|
|
|
|
|
|
contextGatewayProperties.setGroups(groups);
|
|
|
|
|
contextGatewayProperties.setRoutes(routes);
|
|
|
|
|
contextGatewayProperties.setPathRewrites(Optional.ofNullable(pathRewriteResult.getResult())
|
|
|
|
|
contextGatewayProperties.setPathRewrites(Optional.ofNullable(pathRewriteResult).map(PathRewriteResult::getResult)
|
|
|
|
|
.orElse(new ArrayList<>()));
|
|
|
|
|
|
|
|
|
|
logger.debug("Gateway config loaded. :{}", JacksonUtils.serialize2Json(contextGatewayProperties));
|
|
|
|
|