@Slf4j
@Component
@ChannelHandler.Sharable
public class NettyWsHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> {
private static MessageManager messageManager;
private static ConnectionManager connectionManager;
private static RedisUtil redisUtil;
private static ServerConfig serverConfig;
@Autowired
private void setter(MessageManager messageManager, ConnectionManager connectionManager,
RedisUtil redisUtil, ServerConfig serverConfig) {
NettyWsHandler.messageManager = messageManager;
NettyWsHandler.connectionManager = connectionManager;
NettyWsHandler.redisUtil = redisUtil;
NettyWsHandler.serverConfig = serverConfig;
}
...