Package org.togglz.spring.util
Class ContextClassLoaderApplicationContextHolder
- java.lang.Object
-
- org.togglz.spring.util.ContextClassLoaderApplicationContextHolder
-
public class ContextClassLoaderApplicationContextHolder extends Object
Stores theApplicationContextfor the current context class loader.- Author:
- Christian Kaltepoth
-
-
Constructor Summary
Constructors Constructor Description ContextClassLoaderApplicationContextHolder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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.
-
-
-
Method Detail
-
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.
-
-