package eu.europeana.cloud.service.dls; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; public class ApplicationContextUtils implements ApplicationContextAware { private static ApplicationContext applicationContext; public static ApplicationContext getApplicationContext() { return applicationContext; } @Override public void setApplicationContext(final ApplicationContext applicationContext) throws BeansException { ApplicationContextUtils.applicationContext = applicationContext; } }