Package org.togglz.spring.util
Class ContextClassLoaderApplicationContextHolder
java.lang.Object
org.togglz.spring.util.ContextClassLoaderApplicationContextHolder
Stores the
ApplicationContext for the current context class loader.- Author:
- Christian Kaltepoth
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbind(org.springframework.context.ApplicationContext context) Binds theApplicationContextto the current context class loader .static org.springframework.context.ApplicationContextget()Returns theApplicationContextbound to the current context class loader or any of its parent class loaders.static voidrelease()Releases theApplicationContextassociated with the current context class loader.
-
Constructor Details
-
ContextClassLoaderApplicationContextHolder
public ContextClassLoaderApplicationContextHolder()
-
-
Method Details
-
get
public static org.springframework.context.ApplicationContext get()Returns theApplicationContextbound 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 theApplicationContextto the current context class loader . -
release
public static void release()Releases theApplicationContextassociated with the current context class loader.
-