Package org.openiam.util
Class SpringContextProvider
- java.lang.Object
-
- org.openiam.util.SpringContextProvider
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.EmbeddedValueResolverAware
@Component("springContextProvider") @Priority(-2147483648) public class SpringContextProvider extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.context.EmbeddedValueResolverAware
-
-
Constructor Summary
Constructors Constructor Description SpringContextProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
autowire(Object toAutowire)
void
finalize()
static org.springframework.context.ApplicationContext
getApplicationContext()
static <T> T
getBean(Class<T> clazz)
static Object
getBean(String beanName)
static <T> T
getBean(String beanName, Class<T> clazz)
static void
resolveProperties(Object obj)
void
setApplicationContext(org.springframework.context.ApplicationContext ctx)
void
setEmbeddedValueResolver(org.springframework.util.StringValueResolver resolver)
-
-
-
Method Detail
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext ctx) throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getBean
public static <T> T getBean(Class<T> clazz)
-
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext()
-
autowire
public static void autowire(Object toAutowire)
-
setEmbeddedValueResolver
public void setEmbeddedValueResolver(org.springframework.util.StringValueResolver resolver)
- Specified by:
setEmbeddedValueResolver
in interfaceorg.springframework.context.EmbeddedValueResolverAware
-
resolveProperties
public static void resolveProperties(Object obj)
-
-