From 6c2e9ba62c418185361179e7014862c481f34e17 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Wed, 09 Mar 2022 14:22:09 +0800 Subject: [PATCH] conflect merge --- src/main/java/com/xcong/excoin/quartz/job/NettyServerStartUp.java | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/xcong/excoin/quartz/job/NettyServerStartUp.java b/src/main/java/com/xcong/excoin/quartz/job/NettyServerStartUp.java new file mode 100644 index 0000000..024e6c5 --- /dev/null +++ b/src/main/java/com/xcong/excoin/quartz/job/NettyServerStartUp.java @@ -0,0 +1,21 @@ +package com.xcong.excoin.quartz.job; + + +import com.xcong.excoin.netty.server.WebSocketServer; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.stereotype.Component; + +@Component +@ConditionalOnProperty(prefix = "app", name = "netty-job", havingValue = "true") +public class NettyServerStartUp implements CommandLineRunner { + + @Autowired + private WebSocketServer webSocketServer; + + @Override + public void run(String... args) throws Exception { + webSocketServer.start(); + } +} -- Gitblit v1.9.1