fix
Helius
2022-03-10 63bcbbce0ec239b161ff8a53985e7caac9a69b8a
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();
    }
}