Class ApplicationContextHolder

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

    public class ApplicationContextHolder
    extends Object
    implements org.springframework.context.ApplicationContextAware
    Implementation of a Spring interface who is configured in Spring's applicationContext.xml or some other Spring type of way. This class and the spring bean needed to wire it could be used as an alternative to getting the ApplicationContext from the ServletContext.
    • Constructor Detail

      • ApplicationContextHolder

        public ApplicationContextHolder()
    • Method Detail

      • setApplicationContext

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

        public static org.springframework.context.ApplicationContext getContext()
        Access to spring wired beans.