Class ContextClassLoaderApplicationContextHolder

java.lang.Object
org.togglz.spring.util.ContextClassLoaderApplicationContextHolder

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    bind(org.springframework.context.ApplicationContext context)
    Binds the ApplicationContext to the current context class loader .
    static org.springframework.context.ApplicationContext
    get()
    Returns the ApplicationContext bound to the current context class loader or any of its parent class loaders.
    static void
    Releases the ApplicationContext associated with the current context class loader.

    Methods inherited from class java.lang.Object

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

    • ContextClassLoaderApplicationContextHolder

      public ContextClassLoaderApplicationContextHolder()
  • Method Details

    • 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.