Browse Source

Merge branch '2.1.x'

pull/1120/head
Spencer Gibb 5 years ago
parent
commit
6a1bf8d1ee
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 12
      pom.xml
  2. 20
      spring-cloud-gateway-core/pom.xml
  3. 1
      spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/config/GatewayAutoConfiguration.java
  4. 21
      spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegration.java

12
pom.xml

@ -82,6 +82,13 @@ @@ -82,6 +82,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit-jupiter.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
@ -140,6 +147,11 @@ @@ -140,6 +147,11 @@
<artifactId>blockhound-junit-platform</artifactId>
<version>${blockhound.version}</version>
</dependency>
<dependency>
<groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound-junit-platform</artifactId>
<version>${blockhound.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

20
spring-cloud-gateway-core/pom.xml

@ -102,6 +102,26 @@ @@ -102,6 +102,26 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-test-support</artifactId>

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

@ -215,6 +215,7 @@ public class GatewayAutoConfiguration { @@ -215,6 +215,7 @@ public class GatewayAutoConfiguration {
@Bean
@Primary
@ConditionalOnMissingBean(name = "cachedCompositeRouteLocator")
// TODO: property to disable composite?
public RouteLocator cachedCompositeRouteLocator(List<RouteLocator> routeLocators) {
return new CachingRouteLocator(

21
spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegration.java

@ -42,11 +42,32 @@ public class CustomBlockHoundIntegration implements BlockHoundIntegration { @@ -42,11 +42,32 @@ public class CustomBlockHoundIntegration implements BlockHoundIntegration {
builder.allowBlockingCallsInside("org.springframework.util.MimeTypeUtils",
"generateMultipartBoundary");
// SPRING DATA REDIS RELATED
// Uses Unsafe#park
builder.allowBlockingCallsInside(
"org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory",
"getReactiveConnection");
// NETTY RELATED
// Uses Thread#sleep
builder.allowBlockingCallsInside("io.netty.channel.nio.NioEventLoop",
"handleLoopException");
builder.allowBlockingCallsInside(
"io.netty.util.concurrent.SingleThreadEventExecutor", "confirmShutdown");
// Uses Unsafe#park
builder.allowBlockingCallsInside("io.netty.util.concurrent.GlobalEventExecutor",
"execute");
// SECURITY RELATED
// For HTTPS traffic
builder.allowBlockingCallsInside("io.netty.handler.ssl.SslHandler",
"channelActive");
builder.allowBlockingCallsInside("io.netty.handler.ssl.SslHandler",
"channelInactive");
builder.allowBlockingCallsInside("io.netty.handler.ssl.SslHandler", "unwrap");
builder.allowBlockingCallsInside("io.netty.handler.ssl.SslContext",
"newClientContextInternal");

Loading…
Cancel
Save