ContextLoader

Posted jeely

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章