@Order(value=-2147483627)
public class BackgroundPreinitializer
extends java.lang.Object
implements org.springframework.context.ApplicationListener<org.springframework.boot.context.event.SpringApplicationEvent>
ApplicationListener to trigger early initialization in a background thread of
time-consuming tasks.
Set the IGNORE_BACKGROUNDPREINITIALIZER_PROPERTY_NAME system property to
true to disable this mechanism and let such initialization happen in the
foreground.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
IGNORE_BACKGROUNDPREINITIALIZER_PROPERTY_NAME
System property that instructs Spring Boot how to run pre initialization.
|
| Constructor and Description |
|---|
BackgroundPreinitializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
onApplicationEvent(org.springframework.boot.context.event.SpringApplicationEvent event) |
public static final java.lang.String IGNORE_BACKGROUNDPREINITIALIZER_PROPERTY_NAME
true, no pre-initialization happens and each item is
initialized in the foreground as it needs to. When the property is false
(default), pre initialization runs in a separate thread in the background.