fix
Helius
2022-06-27 ad28468e67bfb50839d3aa79520b3c755b3dc9fd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.xcong.farmer.cms;
 
import com.xcong.farmer.cms.netty.server.WebSocketServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
/**
 * @author helius
 */
@EnableSwagger2
@SpringBootApplication
@MapperScan("com.xcong.farmer.cms.modules.*.mapper")
@MapperScan("com.xcong.farmer.cms.modules.*.dao")
public class FarmerCmsApplication implements CommandLineRunner {
 
    @Autowired
    private WebSocketServer webSocketServer;
 
    public static void main(String[] args) {
        SpringApplication.run(FarmerCmsApplication.class, args);
    }
 
    @Override
    public void run(String... args) throws Exception {
        webSocketServer.start();
    }
}