Class SpringApplicationContextHolder

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

    public class SpringApplicationContextHolder
    extends Object
    implements org.springframework.context.ApplicationContextAware
    Maintains a copy of the encapsulating container's Spring ApplicationContext to facilitate programmatic access to ApplicationContext functionality, such as manually auto-wiring business objects not managed by Spring with Spring-managed components.
    • Constructor Detail

      • SpringApplicationContextHolder

        public SpringApplicationContextHolder()
    • 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()