All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.longhaoteng.sdk.common.ApplicationContextKeeper Maven / Gradle / Ivy

The newest version!
package com.github.longhaoteng.sdk.common;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * ApplicationContextKeeper
 *
 * @author mr.long
 */
public class ApplicationContextKeeper implements ApplicationContextAware {

    private static ApplicationContext applicationContext;

    static ApplicationContext getApplicationContext() {
        return applicationContext;
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        ApplicationContextKeeper.applicationContext = applicationContext;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy