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

net.n2oapp.framework.engine.SpringApplicationContextProvider Maven / Gradle / Ivy

There is a newer version: 7.28.2
Show newest version
package net.n2oapp.framework.engine;

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

public class SpringApplicationContextProvider implements ApplicationContextAware {

    private static ApplicationContext applicationContext;

    public static String getEnvironmentProperty(String key) {
        if (applicationContext != null)
            return applicationContext.getEnvironment().getProperty(key);
        return null;
    }

    public void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy