From 33308e16bbb153d9aac76fd703ec0f38ea7e344a Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期三, 09 十月 2024 15:47:59 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes --- hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java index cd7139c..f9e78e0 100644 --- a/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java +++ b/hangzhoumesParent/moduleService/UnLoadGlassModule/src/main/java/com/mes/UnLoadGlassApplication.java @@ -1,13 +1,13 @@ package com.mes; -import com.mes.tools.WebSocketServer; import lombok.extern.slf4j.Slf4j; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.context.ConfigurableApplicationContext; -import springfox.documentation.swagger2.annotations.EnableSwagger2; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.annotation.EnableScheduling; +import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; /** * @Author : zhoush @@ -16,17 +16,15 @@ */ @Slf4j @SpringBootApplication -@EnableSwagger2 +@EnableSwagger2WebMvc @EnableDiscoveryClient @MapperScan(basePackages = "com.mes.*.mapper") +@EnableScheduling +@EnableAsync public class UnLoadGlassApplication { - - public static void main(String[] args) { - SpringApplication springApplication = new SpringApplication(UnLoadGlassApplication.class); - ConfigurableApplicationContext applicationContext = springApplication.run(args); - WebSocketServer.setApplicationContext(applicationContext); + SpringApplication.run(UnLoadGlassApplication.class, args); } } -- Gitblit v1.8.0