Open zydzjy opened 2 years ago
i think, because spring.cluod.gateway.predicate.cloud-foundry-route-service.enable is true new service will join, old service may left.
In GatewayDiscoveryClientAutoConfiguration class:
@Bean
@ConditionalOnClass(name = "org.springframework.cloud.client.discovery.event.HeartbeatMonitor")
public RouteRefreshListener routeRefreshListener(ApplicationEventPublisher publisher) {
return new RouteRefreshListener(publisher);
}
I can not understand what is the relationship between HearbeatMonitor and RouteRereshListener!
We do this so routes located from discovery can be refreshed. Perhaps it should only be active if spring.cloud.gateway.discovery.locator.enabled=true
When i add "spring-cloud-starter-netflix-eureka-client",then SCG add RouteRefreshListener,which refresh routes definition automatically by publishing heartbeat event,is that problem,caus i don't want to refersh routes definition every heartbeat!