From f804361f38b0040e6efd9492df5e179a2d21eba5 Mon Sep 17 00:00:00 2001 From: Spencer Gibb Date: Mon, 1 May 2017 09:08:31 -0600 Subject: [PATCH] Update to web app type enum --- .../cloud/bootstrap/BootstrapApplicationListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/BootstrapApplicationListener.java b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/BootstrapApplicationListener.java index b67846d8..72e98a14 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/BootstrapApplicationListener.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/BootstrapApplicationListener.java @@ -50,6 +50,8 @@ import org.springframework.util.ClassUtils; import org.springframework.util.ReflectionUtils; import org.springframework.util.StringUtils; +import static org.springframework.boot.WebApplicationType.NONE; + /** * A listener that prepares a SpringApplication (e.g. populating its Environment) by * delegating to {@link ApplicationContextInitializer} beans in a separate bootstrap @@ -158,7 +160,7 @@ public class BootstrapApplicationListener .profiles(environment.getActiveProfiles()).bannerMode(Mode.OFF) .environment(bootstrapEnvironment) .properties("spring.application.name:" + configName) - .registerShutdownHook(false).logStartupInfo(false).web(false); + .registerShutdownHook(false).logStartupInfo(false).web(NONE); List> sources = new ArrayList<>(); for (String name : names) { Class cls = ClassUtils.resolveClassName(name, null);