| | |
| | | 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; |
| | | |
| | |
| | | * @author:姜友瑶 |
| | | * @date 2016年10月18日 |
| | | */ |
| | | @Controller |
| | | public class InitWebContainer implements ServletContextAware{ |
| | | @Component |
| | | public class InitWebContainer implements ServletContextAware{ |
| | | |
| | | private static final String TRUE = "true"; |
| | | |
| | |
| | | @Override |
| | | public void setServletContext(ServletContext sc) { |
| | | this.servletContext = sc; |
| | | |
| | | // 初始化调试模式 |
| | | initDebug(); |
| | | // 初始化语言环境 |
| | |
| | | //初始化公司 |
| | | 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; |