!5 修复在linux下启动报错

Merge pull request !5 from ilaotan/master
This commit is contained in:
远方夕阳 2021-05-25 20:38:11 +08:00 committed by Gitee
commit cada6b890e
4 changed files with 11 additions and 12 deletions

View File

@ -102,6 +102,13 @@
<artifactId>netty-transport</artifactId>
<version>${netty.version}</version>
</dependency>
<!-- linux下有效. 其他linux平台自行修改对应的classifier -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-x86_64</classifier>
<version>${netty.version}</version>
</dependency>
<!--- ##################使用netty本SDK时的配置 end ##################-->

View File

@ -55,11 +55,7 @@
<artifactId>netty-transport</artifactId>
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>

View File

@ -147,8 +147,6 @@ public class CIMNioSocketAcceptor extends SimpleChannelInboundHandler<SentBody>{
private void bindAppPort(){
createAppEventGroup();
appBossGroup = new NioEventLoopGroup(bossThreadFactory);
appWorkerGroup = new NioEventLoopGroup(workerThreadFactory);
ServerBootstrap bootstrap = createServerBootstrap(appBossGroup,appWorkerGroup);
bootstrap.childHandler(new ChannelInitializer<SocketChannel>() {
@Override
@ -178,8 +176,6 @@ public class CIMNioSocketAcceptor extends SimpleChannelInboundHandler<SentBody>{
private void bindWebPort(){
createWebEventGroup();
webBossGroup = new NioEventLoopGroup(bossThreadFactory);
webWorkerGroup = new NioEventLoopGroup(workerThreadFactory);
ServerBootstrap bootstrap = createServerBootstrap(webBossGroup,webWorkerGroup);
bootstrap.childHandler(new ChannelInitializer<SocketChannel>() {