From 6d637bc53b638ce926a07a52382d5dafb6c8ec61 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 31 Aug 2018 11:33:59 +0200 Subject: [PATCH] Add missing condition Closes gh-14264 --- .../EmbeddedWebServerFactoryCustomizerAutoConfiguration.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration.java index 49ab1c3ead..1cbaa9f6e5 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/EmbeddedWebServerFactoryCustomizerAutoConfiguration.java @@ -26,6 +26,7 @@ import org.xnio.SslClientAuthMode; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -40,6 +41,7 @@ import org.springframework.core.env.Environment; * @since 2.0.0 */ @Configuration +@ConditionalOnWebApplication @EnableConfigurationProperties(ServerProperties.class) public class EmbeddedWebServerFactoryCustomizerAutoConfiguration {