KKSU
2024-09-30 36be00e0f3cbe0d559c646fd2977e6e3a74aa6f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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();
    }
}