public class AppContext
extends java.lang.Object
ApplicationContext
Environment
propertiesisStarted()
and isReady()
to check whether the app is fully initialized at the moment.Modifier and Type | Class and Description |
---|---|
static class |
AppContext.Internals
INTERNAL.
|
static interface |
AppContext.SecuredOperation<T> |
Constructor and Description |
---|
AppContext() |
Modifier and Type | Method and Description |
---|---|
static org.springframework.context.ApplicationContext |
getApplicationContext()
INTERNAL.
|
static java.lang.String |
getProperty(java.lang.String key)
Get property value defined in the set of
app.properties files. |
static java.lang.String[] |
getPropertyNames() |
static boolean |
isReady() |
static boolean |
isStarted() |
static void |
setProperty(java.lang.String key,
java.lang.String value)
Set property value.
|
public static org.springframework.context.ApplicationContext getApplicationContext()
public static java.lang.String[] getPropertyNames()
app.properties
files@Nullable public static java.lang.String getProperty(java.lang.String key)
app.properties
files.key
- property keypublic static void setProperty(java.lang.String key, @Nullable java.lang.String value)
getProperty(String)
and
getPropertyNames()
, but will not be saved in any app.properties
file and will be lost
after the application restart.key
- property keyvalue
- property value. If null, the property will be removed.public static boolean isStarted()
public static boolean isReady()