Commit 88a82016 by Spencer Gibb

Polish

parent fc0aac3b
...@@ -42,9 +42,10 @@ public class ZuulHandlerMapping extends AbstractUrlHandlerMapping implements ...@@ -42,9 +42,10 @@ public class ZuulHandlerMapping extends AbstractUrlHandlerMapping implements
} }
} }
protected void registerHandlers(Collection<String> routes) { protected void registerHandlers() {
Collection<String> routes = routeLocator.getRoutePaths();
if (routes.isEmpty()) { if (routes.isEmpty()) {
logger.warn("Neither 'urlMap' nor 'mappings' set on SimpleUrlHandlerMapping"); logger.warn("No routes found from ProxyRouteLocator");
} }
else { else {
for (String url : routes) { for (String url : routes) {
...@@ -56,7 +57,7 @@ public class ZuulHandlerMapping extends AbstractUrlHandlerMapping implements ...@@ -56,7 +57,7 @@ public class ZuulHandlerMapping extends AbstractUrlHandlerMapping implements
@ManagedOperation @ManagedOperation
public Map<String, String> reset() { public Map<String, String> reset() {
routeLocator.resetRoutes(); routeLocator.resetRoutes();
registerHandlers(routeLocator.getRoutePaths()); registerHandlers();
return getRoutes(); return getRoutes();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment