Class ContextClassLoaderApplicationContextHolder


  • public class ContextClassLoaderApplicationContextHolder
    extends Object
    Stores the ApplicationContext for the current context class loader.
    Author:
    Christian Kaltepoth
    • Constructor Detail

      • ContextClassLoaderApplicationContextHolder

        public ContextClassLoaderApplicationContextHolder()
    • Method Detail

      • get

        public static org.springframework.context.ApplicationContext get()
        Returns the ApplicationContext bound to the current context class loader or any of its parent class loaders. Walking up the class loader hierarchy is required to support special class loader scenarios like Spring Boot's reloading mechanism.
      • bind

        public static void bind​(org.springframework.context.ApplicationContext context)
        Binds the ApplicationContext to the current context class loader .
      • release

        public static void release()
        Releases the ApplicationContext associated with the current context class loader.