Merge branch '2.1.x'

This commit is contained in:
Spencer Gibb
2019-12-10 13:57:38 -05:00
4 changed files with 54 additions and 0 deletions

12
pom.xml
View File

@@ -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 @@
<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>

View File

@@ -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>

View File

@@ -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(

View File

@@ -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");