Skip to content

Commit

Permalink
Adds property to disable RouteRefreshListener
Browse files Browse the repository at this point in the history
Fixes gh-2958
  • Loading branch information
spencergibb committed Mar 12, 2024
1 parent df81812 commit b594bc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ public RouteLocator cachedCompositeRouteLocator(List<RouteLocator> routeLocators

@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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}

0 comments on commit b594bc4

Please sign in to comment.