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();
|
}
|
}
|