Package com.redis.om.spring.util
Class SpringContext
java.lang.Object
com.redis.om.spring.util.SpringContext
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
@Component
public class SpringContext
extends Object
implements org.springframework.context.ApplicationContextAware
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TReturns the Spring managed bean instance of the given class type if it exists.voidsetApplicationContext(org.springframework.context.ApplicationContext context)
-
Constructor Details
-
SpringContext
public SpringContext()
-
-
Method Details
-
getBean
Returns the Spring managed bean instance of the given class type if it exists. Returns null otherwise.- Parameters:
beanClass-- Returns:
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext context) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-