Browse Source

Moves DefaultRemote* function to default method in interface.

pull/241/head
Spencer Gibb 7 years ago
parent
commit
04567c72fa
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 3
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/handler/predicate/RemoteAddrRoutePredicateFactory.java

3
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/handler/predicate/RemoteAddrRoutePredicateFactory.java

@ -29,7 +29,6 @@ import javax.validation.constraints.NotNull; @@ -29,7 +29,6 @@ import javax.validation.constraints.NotNull;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.gateway.support.ipresolver.DefaultRemoteAddressResolver;
import org.springframework.cloud.gateway.support.ipresolver.RemoteAddressResolver;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.server.ServerWebExchange;
@ -112,7 +111,7 @@ public class RemoteAddrRoutePredicateFactory extends AbstractRoutePredicateFacto @@ -112,7 +111,7 @@ public class RemoteAddrRoutePredicateFactory extends AbstractRoutePredicateFacto
private List<String> sources = new ArrayList<>();
@NotNull
private RemoteAddressResolver remoteAddressResolver = new DefaultRemoteAddressResolver();
private RemoteAddressResolver remoteAddressResolver = new RemoteAddressResolver(){};
public List<String> getSources() {
return sources;

Loading…
Cancel
Save