Adds property to disable RouteRefreshListener
Fixes gh-2958
This commit is contained in:
@@ -264,6 +264,7 @@ public class GatewayAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnClass(name = "org.springframework.cloud.client.discovery.event.HeartbeatMonitor")
|
||||
@ConditionalOnProperty(prefix = GatewayProperties.PREFIX, name = ".route-refresh-listener.enabled", matchIfMissing = true)
|
||||
public RouteRefreshListener routeRefreshListener(ApplicationEventPublisher publisher) {
|
||||
return new RouteRefreshListener(publisher);
|
||||
}
|
||||
|
||||
@@ -424,6 +424,12 @@
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Include the port in matching the host name.",
|
||||
"defaultValue": "true"
|
||||
},
|
||||
{
|
||||
"name": "spring.cloud.gateway.route-refresh-listener.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "If RouteRefreshListener should be turned on.",
|
||||
"defaultValue": "true"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user