Browse Source

Add license text and remove commented out test code

pull/432/head
Tony Clarke 7 years ago
parent
commit
22312fb2c1
  1. 17
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilter.java
  2. 6
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricFilterTests.java

17
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/filter/GatewayMetricsFilter.java

@ -1,3 +1,20 @@ @@ -1,3 +1,20 @@
/*
* Copyright 2013-2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.springframework.cloud.gateway.filter;
import static org.springframework.cloud.gateway.support.ServerWebExchangeUtils.GATEWAY_ROUTE_ATTR;

6
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/GatewayMetricFilterTests.java

@ -122,12 +122,6 @@ public class GatewayMetricFilterTests extends BaseWebClientTests { @@ -122,12 +122,6 @@ public class GatewayMetricFilterTests extends BaseWebClientTests {
@Bean
public RouteLocator myRouteLocator(RouteLocatorBuilder builder) {
// return builder.routes().route("test_bad_target_uri", r ->
// r.host("*.badtarget.org").uri(testUri))
// .route("test_custom_http_status",
// r -> r.host("*.setcustomstatus.org").filters(f ->
// f.setStatus(432)).uri(testUri))
// .build();
return builder.routes()
.route("test_custom_http_status", r -> r.host("*.setcustomstatus.org")
.filters(f -> f.setStatus(432)).uri(testUri))

Loading…
Cancel
Save