From 68763a3c73fccc2d8536e7a929b44600c14dfc0f Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 24 Apr 2018 01:47:18 +0900 Subject: [PATCH] ing --- src/main/java/com/loafle/commons/server/Server.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/loafle/commons/server/Server.java b/src/main/java/com/loafle/commons/server/Server.java index 2306829..4002ae7 100644 --- a/src/main/java/com/loafle/commons/server/Server.java +++ b/src/main/java/com/loafle/commons/server/Server.java @@ -3,6 +3,8 @@ package com.loafle.commons.server; import java.net.SocketAddress; import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -19,13 +21,15 @@ import io.netty.channel.nio.NioEventLoopGroup; * Server */ public abstract class Server { + private static final Logger logger = LoggerFactory.getLogger(Server.class); + @Value("${server.netty.thread.count.boss}") protected int threadCountBoss; @Value("${server.netty.thread.count.worker}") protected int threadCountWorker; @Autowired - protected List> channelClasses; + protected List> channelClasses; @Autowired protected List> channelOptions; @@ -45,7 +49,7 @@ public abstract class Server { serverBootstrap.group(bossGroup, workerGroup); if (null != this.channelClasses) { - for (Class channelClass : this.channelClasses) { + for (Class channelClass : this.channelClasses) { serverBootstrap.channel(channelClass); } } @@ -68,7 +72,7 @@ public abstract class Server { f.channel().closeFuture().sync(); } catch (Exception e) { - + logger.error("Server", e); } finally { this.onStop(); bossGroup.shutdownGracefully();