码迷,mamicode.com
首页 > 其他好文 > 详细

ContextLoader

时间:2019-08-24 11:34:21      阅读:86      评论:0      收藏:0      [点我收藏+]

标签:string   core   int   extend   intellij   created   gets   ide   intel   

//
// 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

标签:string   core   int   extend   intellij   created   gets   ide   intel   

原文地址:https://www.cnblogs.com/Jeely/p/11403877.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!