| | |
| | | |
| | | import com.genersoft.iot.vmp.netty.config.SysConfig; |
| | | import com.genersoft.iot.vmp.netty.server.UdpServer; |
| | | import org.junit.platform.commons.logging.Logger; |
| | | import org.junit.platform.commons.logging.LoggerFactory; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.context.ApplicationListener; |
| | | import org.springframework.context.event.ContextRefreshedEvent; |
| | |
| | | context = contextRefreshedEvent.getApplicationContext(); |
| | | SysConfig sysConfig = (SysConfig) context.getBean(SysConfig.class); |
| | | //获取 udpServer |
| | | UdpServer udpServer = (UdpServer)StartupEvent.getBean(UdpServer.class); |
| | | UdpServer udpServer = (UdpServer) StartupEvent.getBean(UdpServer.class); |
| | | //开启 |
| | | udpServer.run(sysConfig.getUdpReceivePort()); |
| | | } catch (Exception e) { |