Class SpringAppContext
java.lang.Object
org.broadleafcommerce.common.util.SpringAppContext
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public class SpringAppContext
extends Object
implements org.springframework.context.ApplicationContextAware
Provides a means for classes that do not normally have access to
a servlet context or application context to be able to obtain
the current Spring ApplicationContext instance. This should be a last
resort, as it is unlikely this class is ever needed unless an
instance of ApplicationContext is required in a custom class
instantiated by third-party code.
- Author:
- jfischer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.context.ApplicationContext
void
setApplicationContext
(org.springframework.context.ApplicationContext appContext)
-
Constructor Details
-
SpringAppContext
public SpringAppContext()
-
-
Method Details
-
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext appContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-