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

com.netgrif.application.engine.configuration.ApplicationContextProvider.groovy Maven / Gradle / Ivy

Go to download

System provides workflow management functions including user, role and data management.

There is a newer version: 6.4.0
Show newest version
package com.netgrif.application.engine.configuration

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

class ApplicationContextProvider implements ApplicationContextAware {

    private static ApplicationContext context

    @Override
    void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        context = applicationContext
    }

    static ApplicationContext getAppContext() {
        return context
    }

    static def getBean(String name) {
        return context.getBean(name)
    }

    static def getBean(Class aClass) {
        return context.getBean(aClass)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy