tcp服务启动

This commit is contained in:
zc
2026-03-11 17:53:58 +08:00
parent 18e014d9cb
commit dec15eb913
9 changed files with 18 additions and 19 deletions

View File

@@ -1,6 +1,8 @@
package top.wms.admin.tcp.config;
package top.wms.admin.controller.tcp.config;
import top.wms.admin.tcp.handler.TcpServerHandler;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import top.wms.admin.controller.tcp.handler.TcpServerHandler;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
@@ -14,9 +16,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
@Slf4j
@Component
public class NettyTcpServer {

View File

@@ -1,4 +1,4 @@
package top.wms.admin.tcp.config;
package top.wms.admin.controller.tcp.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

View File

@@ -1,8 +1,8 @@
package top.wms.admin.tcp.handler;
package top.wms.admin.controller.tcp.handler;
import top.wms.admin.tcp.config.SimpleRequestMatcher;
import top.wms.admin.tcp.manager.ChannelManager;
import top.wms.admin.tcp.util.SpringContextUtil;
import top.wms.admin.controller.tcp.config.SimpleRequestMatcher;
import top.wms.admin.controller.tcp.util.SpringContextUtil;
import top.wms.admin.controller.tcp.manager.ChannelManager;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;

View File

@@ -1,4 +1,4 @@
package top.wms.admin.tcp.manager;
package top.wms.admin.controller.tcp.manager;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;

View File

@@ -1,4 +1,4 @@
package top.wms.admin.tcp.model;
package top.wms.admin.controller.tcp.model;
import lombok.Data;
import lombok.AllArgsConstructor;

View File

@@ -1,4 +1,4 @@
package top.wms.admin.tcp.model;
package top.wms.admin.controller.tcp.model;
import lombok.Data;
import lombok.AllArgsConstructor;

View File

@@ -1,6 +1,6 @@
package top.wms.admin.tcp.service;
package top.wms.admin.controller.tcp.service;
import top.wms.admin.tcp.model.VMResult;
import top.wms.admin.controller.tcp.model.VMResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

View File

@@ -1,4 +1,4 @@
package top.wms.admin.tcp.util;
package top.wms.admin.controller.tcp.util;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;

View File

@@ -1,11 +1,11 @@
package top.wms.admin.controller.tcp;
package top.wms.admin.controller.vm;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import top.wms.admin.tcp.config.SimpleRequestMatcher;
import top.wms.admin.tcp.manager.ChannelManager;
import top.wms.admin.controller.tcp.config.SimpleRequestMatcher;
import top.wms.admin.controller.tcp.manager.ChannelManager;
@Slf4j
@RestController