类 BackgroundPreinitializer

  • 所有已实现的接口:
    EventListener, org.springframework.context.ApplicationListener<org.springframework.boot.context.event.SpringApplicationEvent>

    @Order(-2147483627)
    public class BackgroundPreinitializer
    extends 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.

    从以下版本开始:
    1.3.0
    • 字段详细资料

      • IGNORE_BACKGROUNDPREINITIALIZER_PROPERTY_NAME

        public static final String IGNORE_BACKGROUNDPREINITIALIZER_PROPERTY_NAME
        System property that instructs Spring Boot how to run pre initialization. When the property is set to 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.
        从以下版本开始:
        2.1.0
        另请参阅:
        常量字段值
    • 方法详细资料

      • onApplicationEvent

        public void onApplicationEvent​(org.springframework.boot.context.event.SpringApplicationEvent event)
        指定者:
        onApplicationEvent 在接口中 org.springframework.context.ApplicationListener<org.springframework.boot.context.event.SpringApplicationEvent>