|  |  | 
 |  |  | package com.zy; | 
 |  |  |  | 
 |  |  | import com.core.common.SpringUtils; | 
 |  |  | import com.zy.common.utils.RandomValidateCodeUtil; | 
 |  |  | import com.zy.core.ServerBootstrap; | 
 |  |  | import org.springframework.boot.SpringApplication; | 
 |  |  | import org.springframework.boot.autoconfigure.SpringBootApplication; | 
 |  |  | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; | 
 |  |  | import org.springframework.scheduling.annotation.EnableAsync; | 
 |  |  | import org.springframework.scheduling.annotation.EnableScheduling; | 
 |  |  |  | 
 |  |  | @EnableAsync | 
 |  |  | @EnableScheduling | 
 |  |  | @SpringBootApplication | 
 |  |  | public class Boot extends SpringBootServletInitializer { | 
 |  |  |  | 
 |  |  |     public static void main(String[] args) { | 
 |  |  |         RandomValidateCodeUtil.init(); | 
 |  |  |         SpringApplication.run(Boot.class, args); | 
 |  |  |         new Thread(()-> { | 
 |  |  |             ServerBootstrap serverBootstrap = SpringUtils.getBean(ServerBootstrap.class); | 
 |  |  |             serverBootstrap.init(); | 
 |  |  |         }).start(); | 
 |  |  | //        new Thread(()-> { | 
 |  |  | //            ServerBootstrap serverBootstrap = SpringUtils.getBean(ServerBootstrap.class); | 
 |  |  | //            serverBootstrap.init(); | 
 |  |  | //        }).start(); | 
 |  |  |  | 
 |  |  |     } | 
 |  |  |  |