Bumping versions
This commit is contained in:
@@ -96,8 +96,8 @@ public class AbstractGatewayControllerEndpoint implements ApplicationEventPublis
|
||||
List<GlobalFilter> globalFilters, List<GatewayFilterFactory> gatewayFilters,
|
||||
List<RoutePredicateFactory> routePredicates, RouteDefinitionWriter routeDefinitionWriter,
|
||||
RouteLocator routeLocator) {
|
||||
this(routeDefinitionLocator, globalFilters, gatewayFilters, routePredicates,
|
||||
routeDefinitionWriter, routeLocator, new WebEndpointProperties());
|
||||
this(routeDefinitionLocator, globalFilters, gatewayFilters, routePredicates, routeDefinitionWriter,
|
||||
routeLocator, new WebEndpointProperties());
|
||||
}
|
||||
|
||||
public AbstractGatewayControllerEndpoint(RouteDefinitionLocator routeDefinitionLocator,
|
||||
@@ -126,8 +126,7 @@ public class AbstractGatewayControllerEndpoint implements ApplicationEventPublis
|
||||
.collectList();
|
||||
}
|
||||
|
||||
private List<GatewayEndpointInfo> mergeEndpoints(List<GatewayEndpointInfo> listA,
|
||||
List<GatewayEndpointInfo> listB) {
|
||||
private List<GatewayEndpointInfo> mergeEndpoints(List<GatewayEndpointInfo> listA, List<GatewayEndpointInfo> listB) {
|
||||
Map<String, List<String>> mergedMap = new HashMap<>();
|
||||
|
||||
Stream.concat(listA.stream(), listB.stream()).forEach(e -> mergedMap
|
||||
|
||||
@@ -50,8 +50,8 @@ public class GatewayControllerEndpoint extends AbstractGatewayControllerEndpoint
|
||||
List<RoutePredicateFactory> routePredicates, RouteDefinitionWriter routeDefinitionWriter,
|
||||
RouteLocator routeLocator, RouteDefinitionLocator routeDefinitionLocator,
|
||||
WebEndpointProperties webEndpointProperties) {
|
||||
super(routeDefinitionLocator, globalFilters, gatewayFilters, routePredicates,
|
||||
routeDefinitionWriter, routeLocator, webEndpointProperties);
|
||||
super(routeDefinitionLocator, globalFilters, gatewayFilters, routePredicates, routeDefinitionWriter,
|
||||
routeLocator, webEndpointProperties);
|
||||
}
|
||||
|
||||
@GetMapping("/routedefinitions")
|
||||
|
||||
@@ -70,29 +70,21 @@ public class GatewayControllerEndpointTests {
|
||||
|
||||
@Test
|
||||
public void testEndpoints() {
|
||||
testClient.get().uri("http://localhost:" + port + "/actuator/gateway").exchange()
|
||||
.expectStatus().isOk().expectBodyList(Map.class).consumeWith(result -> {
|
||||
testClient.get().uri("http://localhost:" + port + "/actuator/gateway").exchange().expectStatus().isOk()
|
||||
.expectBodyList(Map.class).consumeWith(result -> {
|
||||
List<Map> responseBody = result.getResponseBody();
|
||||
assertThat(responseBody).isNotEmpty();
|
||||
assertThat(responseBody).contains(
|
||||
Map.of("href", "/actuator/gateway/", "methods",
|
||||
List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/globalfilters", "methods",
|
||||
List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/refresh", "methods",
|
||||
List.of("POST")),
|
||||
Map.of("href", "/actuator/gateway/routedefinitions",
|
||||
"methods", List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/routefilters", "methods",
|
||||
List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/routepredicates", "methods",
|
||||
List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/routes", "methods",
|
||||
List.of("POST", "GET")),
|
||||
Map.of("href", "/actuator/gateway/routes/test-service",
|
||||
"methods", List.of("POST", "DELETE", "GET")),
|
||||
Map.of("href", "/actuator/gateway/routes/route_with_metadata",
|
||||
"methods", List.of("POST", "DELETE", "GET")));
|
||||
assertThat(responseBody).contains(Map.of("href", "/actuator/gateway/", "methods", List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/globalfilters", "methods", List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/refresh", "methods", List.of("POST")),
|
||||
Map.of("href", "/actuator/gateway/routedefinitions", "methods", List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/routefilters", "methods", List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/routepredicates", "methods", List.of("GET")),
|
||||
Map.of("href", "/actuator/gateway/routes", "methods", List.of("POST", "GET")),
|
||||
Map.of("href", "/actuator/gateway/routes/test-service", "methods",
|
||||
List.of("POST", "DELETE", "GET")),
|
||||
Map.of("href", "/actuator/gateway/routes/route_with_metadata", "methods",
|
||||
List.of("POST", "DELETE", "GET")));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user