change the default route from / to /**

fixes gh-105
This commit is contained in:
Spencer Gibb
2014-12-15 17:15:49 -07:00
parent 4d9281c2af
commit 789cf6d752
2 changed files with 4 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ import org.springframework.util.StringUtils;
@Slf4j
public class ProxyRouteLocator {
public static final String DEFAULT_ROUTE = "/";
public static final String DEFAULT_ROUTE = "/**";
private DiscoveryClient discovery;

View File

@@ -147,7 +147,7 @@ public class ProxyRouteLocatorTests {
@Test
public void testGetDefaultRoute() {
ProxyRouteLocator routeLocator = new ProxyRouteLocator(this.discovery, this.properties);
this.properties.getRoutes().put(ASERVICE, new ZuulRoute("/", ASERVICE));
this.properties.getRoutes().put(ASERVICE, new ZuulRoute("/**", ASERVICE));
Map<String, String> routesMap = routeLocator.getRoutes();
@@ -159,7 +159,7 @@ public class ProxyRouteLocatorTests {
@Test
public void testGetDefaultPhysicalRoute() {
ProxyRouteLocator routeLocator = new ProxyRouteLocator(this.discovery, this.properties);
this.properties.getRoutes().put(ASERVICE, new ZuulRoute("/", "http://" + ASERVICE));
this.properties.getRoutes().put(ASERVICE, new ZuulRoute("/**", "http://" + ASERVICE));
Map<String, String> routesMap = routeLocator.getRoutes();
@@ -226,7 +226,7 @@ public class ProxyRouteLocatorTests {
}
protected void assertDefaultMapping(Map<String, String> routesMap, String expectedRoute) {
String mapping = "/";
String mapping = "/**";
String route = routesMap.get(mapping);
assertEquals("routesMap had wrong value for " + mapping, expectedRoute,
route);