[update] 显式指定注解处理器,4.x

This commit is contained in:
wujiawei
2026-01-06 23:30:55 +08:00
parent 9d9f3fc4c6
commit 4d6c5fcbd7
47 changed files with 198 additions and 87 deletions

View File

@@ -15,8 +15,8 @@ import org.springframework.stereotype.Component;
@Component
public class NettyTcpServerSocketApplicationListener implements SocketApplicationListener {
private final EventLoopGroup bossGroup = new NioEventLoopGroup();
private final EventLoopGroup workerGroup = new NioEventLoopGroup();
private final EventLoopGroup bossGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
private final EventLoopGroup workerGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
private final NettyTcpServerFilter nettyTcpServerFilter;// 通道业务处理
private final ServerNodeProperties serverNodeProperties;
private ChannelFuture channelFuture;

View File

@@ -18,7 +18,7 @@ import org.springframework.stereotype.Component;
//@Component
public class NettyUdpServerSocketApplicationListener implements SocketApplicationListener {
private final EventLoopGroup bossGroup = "linux".equalsIgnoreCase(SystemPropertyUtil.get("os.name")) ? new EpollEventLoopGroup() : new NioEventLoopGroup();
private final EventLoopGroup bossGroup = "linux".equalsIgnoreCase(SystemPropertyUtil.get("os.name")) ? new EpollEventLoopGroup() : new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
private final NettyUdpServerFilter nettyUdpServerFilter;// 通道业务处理
private final ServerNodeProperties serverNodeProperties;
private ChannelFuture channelFuture;

View File

@@ -14,8 +14,8 @@ import org.framework.lazy.cloud.network.heartbeat.server.netty.permeate.tcp.filt
*/
@Deprecated
public class NettyOnCloudNettyServerSocket {
private final EventLoopGroup bossGroup = new NioEventLoopGroup();
private final EventLoopGroup workerGroup = new NioEventLoopGroup();
private final EventLoopGroup bossGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
private final EventLoopGroup workerGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
private final NettyTcpServerFilter nettyTcpServerFilter;// 通道业务处理
private ChannelFuture channelFuture;

View File

@@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
*/
@Slf4j
public class NettyTcpClientPermeateServerConnectRealSocket {
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
/**

View File

@@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit;
*/
@Slf4j
public class NettyTcpServerPermeateServerConnectRealSocket {
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
/**
* 连接真实服务

View File

@@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
*/
@Slf4j
public class NettyUdpClientPermeateServerConnectRealSocket {
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
/**

View File

@@ -17,7 +17,7 @@ import java.util.concurrent.TimeUnit;
*/
@Slf4j
public class NettyUdpServerPermeateServerConnectRealSocket {
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
/**
* 连接真实服务

View File

@@ -18,7 +18,7 @@ import java.util.concurrent.TimeUnit;
*/
@Slf4j
public class NettyHttpClientProxyServerRealSocket {
private static final EventLoopGroup eventLoopGroup = new NioEventLoopGroup();
private static final EventLoopGroup eventLoopGroup = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
/**

View File

@@ -15,6 +15,7 @@ import org.framework.lazy.cloud.network.heartbeat.common.advanced.payload.NettyP
import org.framework.lazy.cloud.network.heartbeat.common.advanced.proxy.socks.server.AbstractHandleSocksReportServerProxyClientConnectionSuccessTypeAdvanced;
import org.framework.lazy.cloud.network.heartbeat.common.decoder.TransferDecoder;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelAttributeKeyUtils;
import org.framework.lazy.cloud.network.heartbeat.common.utils.ChannelUtils;
import org.framework.lazy.cloud.network.heartbeat.protocol.handler.NettySocks5CommandRequestHandler;
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.filter.NettySocksServerProxyClientVisitorFilter;
import org.framework.lazy.cloud.network.heartbeat.server.netty.proxy.socks.handler.NettySocksClientProxyServerRealHandler;
@@ -74,8 +75,8 @@ public class ServerHandleSocksReportServerProxyClientConnectionSuccessTypeAdvanc
nextChannel.pipeline().addLast(new NettySocksServerProxyClientVisitorFilter());
nextChannel.pipeline().remove(NettySocks5CommandRequestHandler.class);
nextChannel.pipeline().remove(Socks5CommandRequestDecoder.class);
ChannelUtils.safeRemoveHandler(nextChannel,NettySocks5CommandRequestHandler.class);
ChannelUtils.safeRemoveHandler(nextChannel,Socks5CommandRequestDecoder.class);
}
}