Class SpringContextProvider

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class SpringContextProvider
    extends java.lang.Object
    implements org.springframework.context.ApplicationContextAware
    Provides current spring ApplicationContext for non-bean classes.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.springframework.context.ApplicationContext getContext()  
      void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)  
      protected static void setContextThreadSafe​(org.springframework.context.ApplicationContext applicationContext)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringContextProvider

        public SpringContextProvider()
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • getContext

        public static org.springframework.context.ApplicationContext getContext()
      • setContextThreadSafe

        protected static void setContextThreadSafe​(org.springframework.context.ApplicationContext applicationContext)
                                            throws org.springframework.beans.BeansException
        Throws:
        org.springframework.beans.BeansException