ContextLoader
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
// package com.neusoft.unieap.core.listener; import com.neusoft.unieap.core.protection.ProtectionConfig;
import com.neusoft.unieap.core.protection.custom.CustomCheck;
import com.neusoft.unieap.core.validation.i18n.I18nGlobalContext;
import java.io.File;
import javax.servlet.ServletContext;
import org.springframework.web.context.ConfigurableWebApplicationContext; public class ContextLoader extends org.springframework.web.context.ContextLoader {
public ContextLoader() {
} protected void customizeContext(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext) {
String licensePath = File.separator + "WEB-INF" + File.separator + "conf" + File.separator + "unieap" + File.separator + "license";
System.out.println("我是licensePath============="+licensePath);
I18nGlobalContext.getInstance().setServletContext(servletContext);
ProtectionConfig.filePath = applicationContext.getServletContext().getRealPath(licensePath);
System.out.println("ProtectionConfig.filePath============="+ProtectionConfig.filePath);
CustomCheck.getInstance().check(false);
}
}
ContextLoader的更多相关文章
- 解决log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader)警告信息的问题
spring项目经常在启动tomcat时报如下警告信息: log4j:WARN No appenders could be found for logger (org.springframework. ...
- Log4j使用教程 log4:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
1.Logger类 通过Logger类的静态方法Logger.getRootLogger得到RootLogger.所有其他的loggers是通过静态方法Logger.getLogger来实例化并获取的 ...
- [ERROR][org.springframework.web.context.ContextLoader][main] Context initialization failed org.sprin
做一个SSH为基础框架的webapp小DEMO,复制了一把以前可以跑的代码,竟发现无法初始化数据源,报错如下: [ERROR][org.springframework.web.context.Cont ...
- Spring源码情操陶冶-ContextLoader
前言-阅读源码有利于陶冶情操,本文承接前文Spring源码情操陶冶-ContextLoaderListener 静态代码块内容 ContextLoader在被主动调用的时候,会执行其的一个静态块,代码 ...
- log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
一.异常描述: log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLo ...
- ContextLoader,ContextLoaderListener解读
一.ServletContext 有 addListener(..) 方法,也有创建的方法 createListener(Class<T> c) . 有addFilter(..) 方法,也 ...
- idea出现Error configuring application listener of class org.springframework.web.context.ContextLoader
在IDEA中写spring mvc时出现Error configuring application listener of class org.springframework.web.context. ...
- maven ClassNotFoundException: org.springframework.web.context.ContextLoader
信息: Starting Servlet Engine: Apache Tomcat/6.0.32 2012-3-31 9:39:40 org.apache.catalina.core.Standar ...
- 关于解决java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoader问题
解决方案: 其实是你的jar文件没有同步发布到自己项目的lib目录中 (如果是用Maven进行构建的话) 可以试试 下面的办法 –rebuild下project就可以了 项目点击右键 点击 Prope ...
随机推荐
- ceph对接openstack
一.使用rbd方式提供存储如下数据: (1)image(glance):保存glanc中的image: (2)volume(cinder)存储:保存cinder的volume:保存创建虚拟机时选择创建 ...
- liunx weblogic服务启停脚本
#!/bin/bash #sh xx.sh start xx项目 例如:sh autoWeblogic.sh start bius #经测试发现weblogic 启动大概需要完全启动成功35秒左右 停 ...
- 利用zookeeper部署kafka集群
1.准备工作: iptables -F #关闭防火墙 systemctl stop firewalld.service #关闭防火墙 准备三台虚拟机并放入/etc/hosts下 192.16 ...
- Python核心技术与实战——十五|深入了解迭代器和生成器
我们在前面应该写过类似的代码 for i in [1,2,3,4,5]: print(i) for in 语句看起来很直观,很便于理解,比起C++或Java早起的 ; i<n;i++) prin ...
- DECLARE_GLOBAL_DATA_PTR
DECLARE_GLOBAL_DATA_PTR在arch/arm/include/asm/global_data.h中定义 #include <asm-generic/global_data.h ...
- 点对点协议PPP
----- ------
- 【NOIP2012模拟10.31】掷骰子
题目 太郎和一只免子正在玩一个掷骰子游戏.有一个有N个格子的长条棋盘,太郎和兔子轮流掷一个有M面的骰子,骰子M面分别是1到M的数字.且掷到任意一面的概率是相同的.掷到几.就往前走几步.当谁走到第N格时 ...
- Idea中Springboot热部署无效解决方法
仅适用IDEA中,eclipse中不需要设置 一.开启idea自动make功能 1 - Enable Automake when the application is running PRESS: C ...
- PHP基础教程 PHP的页面缓冲处理机制
PHP有很多机制.函数,其实就是魔术师,重复发挥好,其实甚至是简单应用,就会出现神奇的效果.兄弟连PHP培训 这里来讲一个ob_start()函数. ob_start()函数用于打开缓冲区,比如hea ...
- Sublime Text 3 程序运行后中文显示乱码的解决方案
问题描述: 问题分析: 新建python文件,输入下面代码,测试发现发送给python解释器时,默认为cp936的编码方式,而py文件为UTF-8的编码方式,cp936和UTF-8的编码方式对于英文字 ...