在netty信息发送的时候,ChannelInboundHandlerAdapter类下的channelRead方法中的参数msg转化string错误
这个不能直接转成String,而是
ByteBuf buf= (ByteBuf) msg;
String message = buf.toString(CharsetUtil.UTF_8);
这样进行转换才可以

在netty信息发送的时候,ChannelInboundHandlerAdapter类下的channelRead方法中的参数msg转化string错误
这个不能直接转成String,而是
ByteBuf buf= (ByteBuf) msg;
String message = buf.toString(CharsetUtil.UTF_8);
这样进行转换才可以