pull/1/head
tanghc 5 years ago
parent 18841b199e
commit caaff21876
  1. 12
      sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/gateway/route/GatewayRouteRepository.java

@ -27,14 +27,10 @@ import static java.util.Collections.synchronizedMap;
* @author tanghc
*/
@Slf4j
public class GatewayRouteRepository implements ApplicationEventPublisherAware,
RouteDefinitionRepository,
RouteRepository<GatewayTargetRoute> {
public class GatewayRouteRepository implements RouteDefinitionRepository, RouteRepository<GatewayTargetRoute> {
private final Map<String, GatewayTargetRoute> routes = synchronizedMap(new LinkedHashMap<>());
private ApplicationEventPublisher publisher;
@Override
public Flux<org.springframework.cloud.gateway.route.RouteDefinition> getRouteDefinitions() {
List<org.springframework.cloud.gateway.route.RouteDefinition> list = routes.values().parallelStream()
@ -91,7 +87,6 @@ public class GatewayRouteRepository implements ApplicationEventPublisherAware,
@Override
public void delete(String id) {
routes.remove(id);
this.publisher.publishEvent(new PredicateArgsEvent(this, id, Collections.emptyMap()));
}
@Override
@ -106,9 +101,4 @@ public class GatewayRouteRepository implements ApplicationEventPublisherAware,
}
}
@Override
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
this.publisher = applicationEventPublisher;
}
}
Loading…
Cancel
Save