deployed 2.0.0.RELEASE

master
剑器近 2021-06-11 15:35:08 +08:00
parent 75fb5938a5
commit 4f358a38c8
4 changed files with 11 additions and 3 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.yezhihao</groupId>
<artifactId>netmc</artifactId>
<version>1.0.5.RELEASE</version>
<version>2.0.0.RELEASE</version>
<packaging>jar</packaging>
<name>Netmc</name>
@ -74,7 +74,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.7</version>
<version>5.3.8</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@ -67,7 +67,7 @@ public class TCPServerHandler extends ChannelInboundHandlerAdapter {
}
time = System.currentTimeMillis() - time;
if (time > 200)
log.info("=========消息ID{},处理耗时{}ms,", request.getMessageId(), time);
log.info("========={},处理耗时{}ms,", request.getMessageName(), time);
if (response != null)
ctx.writeAndFlush(response);
}

View File

@ -15,6 +15,9 @@ public interface Message extends Serializable {
/** 消息类型 */
Serializable getMessageId();
/** 消息类型(日志输出) */
String getMessageName();
/** 消息流水号 */
int getSerialNo();
}

View File

@ -45,6 +45,11 @@ public class MyMessage implements Message {
return header.getType();
}
@Override
public String getMessageName() {
return String.valueOf(header.getType());
}
@Override
public int getSerialNo() {
return header.getSerialNo();