diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteRepository.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteRepository.java index da185871..27d8a26e 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteRepository.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteRepository.java @@ -4,6 +4,7 @@ import com.gitee.sop.gatewaycommon.bean.GatewayRouteDefinition; import com.gitee.sop.gatewaycommon.bean.TargetRoute; import com.gitee.sop.gatewaycommon.manager.RouteRepository; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.cloud.gateway.event.PredicateArgsEvent; import org.springframework.cloud.gateway.event.RefreshRoutesEvent; import org.springframework.cloud.gateway.route.RouteDefinition; @@ -100,6 +101,7 @@ public class GatewayRouteRepository implements ApplicationEventPublisherAware, @Override public void deleteAll(String serviceId) { List idList = this.routes.values().stream() + .filter(zuulTargetRoute -> StringUtils.equalsIgnoreCase(serviceId, zuulTargetRoute.getServiceRouteInfo().getServiceId())) .map(zuulTargetRoute -> zuulTargetRoute.getRouteDefinition().getId()) .collect(Collectors.toList()); diff --git a/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.properties b/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.properties index c2709748..d0f57265 100644 --- a/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.properties +++ b/sop-example/sop-story/sop-story-web/src/main/resources/application-dev.properties @@ -15,9 +15,9 @@ dubbo.registry.address=N/A dubbo.scan.base-packages=com.gitee.sop.storyweb.service # zipkin服务跟踪 -spring.zipkin.base-url=http://127.0.0.1:9411/ -# 设置sleuth收集信息的比率,默认0.1,最大是1,数字越大越耗性能 -spring.sleuth.sampler.probability=1 -# dubbo使用zipkin过滤器 -dubbo.provider.filter=tracing -dubbo.consumer.filter=tracing +#spring.zipkin.base-url=http://127.0.0.1:9411/ +## 设置sleuth收集信息的比率,默认0.1,最大是1,数字越大越耗性能 +#spring.sleuth.sampler.probability=1 +## dubbo使用zipkin过滤器 +#dubbo.provider.filter=tracing +#dubbo.consumer.filter=tracing