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

lithium.classloadertest.spring.SpringApplicationContext Maven / Gradle / Ivy

The newest version!
package lithium.classloadertest.spring;

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

/**
 * @author eddie.lo
 */
@Component
public class SpringApplicationContext implements ApplicationContextAware {

	private ApplicationContext appContext;
	
	 /**
	   * This method is called from within the ApplicationContext once it is 
	   * done starting up, it will stick a reference to itself into this bean.
	   * @param appContext a reference to the ApplicationContext.
	   */
	@Override
	public void setApplicationContext(ApplicationContext appContext) throws BeansException {
		this.appContext = appContext;
	}

	public ApplicationContext getAppContext() {
		return appContext;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy