ContextLoader
生活随笔
收集整理的這篇文章主要介紹了
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的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: std::wcout输出1遍不输出
- 下一篇: 如何增加Tomcat内存