@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure.context;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration ;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration ;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean ;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean ;
import org.springframework.boot.autoconfigure.condition.SearchStrategy ;
import org.springframework.boot.context.properties.EnableConfigurationProperties ;
import org.springframework.boot.context.properties.EnableConfigurationProperties ;
import org.springframework.context.annotation.Bean ;
import org.springframework.context.annotation.Bean ;
import org.springframework.context.annotation.Configuration ;
import org.springframework.context.annotation.Configuration ;
@ -36,7 +37,8 @@ import org.springframework.context.support.DefaultLifecycleProcessor;
public class LifecycleAutoConfiguration {
public class LifecycleAutoConfiguration {
@Bean ( name = AbstractApplicationContext . LIFECYCLE_PROCESSOR_BEAN_NAME )
@Bean ( name = AbstractApplicationContext . LIFECYCLE_PROCESSOR_BEAN_NAME )
@ConditionalOnMissingBean ( name = AbstractApplicationContext . LIFECYCLE_PROCESSOR_BEAN_NAME )
@ConditionalOnMissingBean ( name = AbstractApplicationContext . LIFECYCLE_PROCESSOR_BEAN_NAME ,
search = SearchStrategy . CURRENT )
public DefaultLifecycleProcessor defaultLifecycleProcessor ( LifecycleProperties properties ) {
public DefaultLifecycleProcessor defaultLifecycleProcessor ( LifecycleProperties properties ) {
DefaultLifecycleProcessor lifecycleProcessor = new DefaultLifecycleProcessor ( ) ;
DefaultLifecycleProcessor lifecycleProcessor = new DefaultLifecycleProcessor ( ) ;
lifecycleProcessor . setTimeoutPerShutdownPhase ( properties . getTimeoutPerShutdownPhase ( ) . toMillis ( ) ) ;
lifecycleProcessor . setTimeoutPerShutdownPhase ( properties . getTimeoutPerShutdownPhase ( ) . toMillis ( ) ) ;