自动化立体仓库 - WCS系统
#
luxiaotao1123
2020-08-31 26a4094ceb2f205233133d0d492b4e459d6b8871
#
2个文件已修改
15 ■■■■ 已修改文件
src/main/java/com/zy/Boot.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/ServerBootstrap.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/Boot.java
@@ -1,8 +1,6 @@
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;
@@ -15,10 +13,10 @@
    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();
    }
src/main/java/com/zy/core/ServerBootstrap.java
@@ -10,8 +10,10 @@
import com.zy.core.thread.DevpThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
/**
@@ -27,7 +29,8 @@
    private MainProcess mainProcess;
//    @PostConstruct
    @PostConstruct
    @Async
    public void init(){
        log.info("核心控制层开始初始化...............................................");
        // 初始化消息队列