Package org.hawaiiframework.context
Class ApplicationContextHolder
java.lang.Object
org.hawaiiframework.context.ApplicationContextHolder
Utility class to obtain Spring's application context.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
bind
(org.springframework.context.ApplicationContext context) Binds theApplicationContext
to the current context class loader.static org.springframework.context.ApplicationContext
Get the application context, or returnnull
.static org.springframework.context.ApplicationContext
Get the application context, or throw anIllegalStateException
.static void
release()
Releases theApplicationContext
associated with the current context class loader.
-
Method Details
-
getRequiredApplicationContext
public static org.springframework.context.ApplicationContext getRequiredApplicationContext()Get the application context, or throw anIllegalStateException
. -
getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext()Get the application context, or returnnull
. -
bind
public static void bind(org.springframework.context.ApplicationContext context) Binds theApplicationContext
to the current context class loader.- Parameters:
context
- the application context to bind
-
release
public static void release()Releases theApplicationContext
associated with the current context class loader.
-