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 Details

    • SpringContext

      public SpringContext()
  • Method Details

    • getBean

      public static <T> T getBean(Class<T> beanClass)
      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:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException