From 605ad677377b5aa3e163890ef3ca43df49f57e67 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Thu, 18 Mar 2021 19:47:33 +0800 Subject: [PATCH] modify --- zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java b/zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java index a9f0527..5425c15 100644 --- a/zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java +++ b/zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java @@ -14,6 +14,9 @@ import com.matrix.system.common.service.SysCompanyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.event.ContextRefreshedEvent; +import org.springframework.context.event.EventListener; +import org.springframework.stereotype.Component; import org.springframework.stereotype.Controller; import org.springframework.web.context.ServletContextAware; @@ -25,8 +28,8 @@ * @author:姜友瑶 * @date 2016年10月18日 */ -@Controller -public class InitWebContainer implements ServletContextAware{ +@Component +public class InitWebContainer implements ServletContextAware{ private static final String TRUE = "true"; @@ -62,7 +65,6 @@ @Override public void setServletContext(ServletContext sc) { this.servletContext = sc; - // 初始化调试模式 initDebug(); // 初始化语言环境 @@ -70,13 +72,18 @@ //初始化公司 initParams(); LogUtil.info("\r\n\r\n**********************************************\r\n" - + "* =========== Matrix启动成功 ===========\r\n" + + "* =========== Matrix启动成功 ===========\r\n" + "* DEBUG模式:" + debug+"*\r\n" + "* 语言环境:" + Locale.getDefault().getLanguage()+"\r\n" - + + "**********************************************\r\n"); } +// @EventListener +// public void onApplicationEvent(ContextRefreshedEvent event) { +// +// } + private void initDebug() { if (TRUE.equals(debug)) { MatrixConstance.DEBUG = true; -- Gitblit v1.9.1