|
|
|
@ -2,11 +2,10 @@ package cn.estsh.i3plus.core.apiservice.configuration;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.base.ISystemInitService;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ImppSwitchUtil;
|
|
|
|
|
import cn.estsh.impp.framework.boot.init.IAppStartSystemInit;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.boot.CommandLineRunner;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -17,26 +16,23 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
* @Modify:
|
|
|
|
|
**/
|
|
|
|
|
@Component
|
|
|
|
|
public class AppStartSystemInit implements CommandLineRunner {
|
|
|
|
|
public class AppStartSystemInit implements IAppStartSystemInit {
|
|
|
|
|
|
|
|
|
|
public static final Logger LOGGER = LoggerFactory.getLogger(CommonConstWords.SYSTEM_LOG);
|
|
|
|
|
|
|
|
|
|
@Autowired(required = false)
|
|
|
|
|
@Autowired
|
|
|
|
|
private ISystemInitService systemInitService;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 系统初始化回调方法
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void run(String... args) throws Exception {
|
|
|
|
|
public void systemInit() {
|
|
|
|
|
try {
|
|
|
|
|
if(ImppSwitchUtil.isUnitTestEnv()) {
|
|
|
|
|
LOGGER.info("【单元测试环境 跳过初始化...】");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
LOGGER.info("【IMPP-Core开始加载基础信息...】");
|
|
|
|
|
|
|
|
|
|
systemInitService.putAndLoadAll();
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|