Browse Source

Removes java.net.preferIPv4Stack hack

pull/41/head
Spencer Gibb 8 years ago
parent
commit
b479cacfcb
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 1
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/config/GatewayConfiguration.java
  2. 5
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/BaseWebClientTests.java
  3. 1
      spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java
  4. 1
      spring-cloud-gateway-sample/src/main/java/org/springframework/cloud/gateway/sample/GatewaySampleApplication.java
  5. 4
      spring-cloud-gateway-sample/src/test/java/org/springframework/cloud/gateway/sample/GatewaySampleApplicationTests.java

1
spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/config/GatewayConfiguration.java

@ -25,6 +25,7 @@ import org.springframework.context.annotation.Configuration; @@ -25,6 +25,7 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
public class GatewayConfiguration {
@Bean
public Marker gatewayMarker() {
return new Marker();

5
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/BaseWebClientTests.java

@ -43,11 +43,6 @@ public class BaseWebClientTests { @@ -43,11 +43,6 @@ public class BaseWebClientTests {
protected static final String ROUTE_ID_HEADER = "X-Gateway-Route-Id";
protected static final Duration DURATION = Duration.ofSeconds(5);
static {
//TODO: wait for option in boot 2.0
System.setProperty("java.net.preferIPv4Stack", "true");
}
@LocalServerPort
protected int port = 0;

1
spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/test/GatewayTestApplication.java

@ -90,7 +90,6 @@ public class GatewayTestApplication { @@ -90,7 +90,6 @@ public class GatewayTestApplication {
}
public static void main(String[] args) {
System.setProperty("java.net.preferIPv4Stack", "true"); //Remove when configurable
SpringApplication.run(GatewayTestApplication.class, args);
}
}

1
spring-cloud-gateway-sample/src/main/java/org/springframework/cloud/gateway/sample/GatewaySampleApplication.java

@ -53,7 +53,6 @@ public class GatewaySampleApplication { @@ -53,7 +53,6 @@ public class GatewaySampleApplication {
}
public static void main(String[] args) {
System.setProperty("java.net.preferIPv4Stack", "true"); //Remove when configurable
SpringApplication.run(GatewaySampleApplication.class, args);
}
}

4
spring-cloud-gateway-sample/src/test/java/org/springframework/cloud/gateway/sample/GatewaySampleApplicationTests.java

@ -41,10 +41,6 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen @@ -41,10 +41,6 @@ import static org.springframework.boot.test.context.SpringBootTest.WebEnvironmen
@RunWith(SpringRunner.class)
@SpringBootTest(classes = GatewaySampleApplication.class, webEnvironment = RANDOM_PORT)
public class GatewaySampleApplicationTests {
static {
//TODO: wait for option in boot 2.0
System.setProperty("java.net.preferIPv4Stack", "true");
}
@LocalServerPort
protected int port = 0;

Loading…
Cancel
Save