Skip to content

Commit 8077a0d

Browse files
committed
Upgrade to Netty 4.2.2.Final
Closes gh-46050
1 parent 3ec9cee commit 8077a0d

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/MongoReactiveAutoConfiguration.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
import com.mongodb.connection.TransportSettings;
2222
import com.mongodb.reactivestreams.client.MongoClient;
2323
import io.netty.channel.EventLoopGroup;
24-
import io.netty.channel.nio.NioEventLoopGroup;
24+
import io.netty.channel.MultiThreadIoEventLoopGroup;
25+
import io.netty.channel.nio.NioIoHandler;
2526
import io.netty.channel.socket.SocketChannel;
2627
import reactor.core.publisher.Flux;
2728

@@ -86,7 +87,7 @@ StandardMongoClientSettingsBuilderCustomizer standardMongoSettingsCustomizer(Mon
8687
}
8788

8889
@Configuration(proxyBeanMethods = false)
89-
@ConditionalOnClass({ SocketChannel.class, NioEventLoopGroup.class })
90+
@ConditionalOnClass({ SocketChannel.class, NioIoHandler.class })
9091
static class NettyDriverConfiguration {
9192

9293
@Bean
@@ -115,9 +116,8 @@ static final class NettyDriverMongoClientSettingsBuilderCustomizer
115116
@Override
116117
public void customize(Builder builder) {
117118
if (!isCustomTransportConfiguration(this.settings.getIfAvailable())) {
118-
NioEventLoopGroup eventLoopGroup = new NioEventLoopGroup();
119-
this.eventLoopGroup = eventLoopGroup;
120-
builder.transportSettings(TransportSettings.nettyBuilder().eventLoopGroup(eventLoopGroup).build());
119+
this.eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
120+
builder.transportSettings(TransportSettings.nettyBuilder().eventLoopGroup(this.eventLoopGroup).build());
121121
}
122122
}
123123

spring-boot-project/spring-boot-dependencies/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,17 +1634,13 @@ bom {
16341634
releaseNotes("https://github.com/neo4j/neo4j-java-driver/releases/tag/{version}")
16351635
}
16361636
}
1637-
library("Netty", "4.1.122.Final") {
1637+
library("Netty", "4.2.2.Final") {
16381638
prohibit {
16391639
contains ".Alpha"
16401640
contains ".Beta"
16411641
contains ".RC"
16421642
because "we don't want alphas, betas, or release candidates"
16431643
}
1644-
prohibit {
1645-
versionRange "[4.2.0,)"
1646-
because "Reactor Netty will not support it in time for 3.5.x"
1647-
}
16481644
group("io.netty") {
16491645
bom("netty-bom")
16501646
}

0 commit comments

Comments
 (0)