deployed 2.0.0.RELEASE
parent
75fb5938a5
commit
4f358a38c8
4
pom.xml
4
pom.xml
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,9 @@ public interface Message extends Serializable {
|
|||
/** 消息类型 */
|
||||
Serializable getMessageId();
|
||||
|
||||
/** 消息类型(日志输出) */
|
||||
String getMessageName();
|
||||
|
||||
/** 消息流水号 */
|
||||
int getSerialNo();
|
||||
}
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue