From a124379dd9df2d14092c0deec82bd1ea21377985 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 22 May 2018 12:51:06 +0200 Subject: [PATCH] Remove use of deprecated `web` methods Closes gh-13231 --- .../boot/builder/SpringApplicationBuilder.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java index d75af0fd09..add5881052 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java @@ -189,7 +189,7 @@ public class SpringApplicationBuilder { // It's not possible if embedded web server are enabled to support web contexts as // parents because the servlets cannot be initialized at the right point in // lifecycle. - web(false); + web(WebApplicationType.NONE); // Probably not interested in multiple banners bannerMode(Banner.Mode.OFF); @@ -208,8 +208,9 @@ public class SpringApplicationBuilder { */ public SpringApplicationBuilder parent(Class... sources) { if (this.parent == null) { - this.parent = new SpringApplicationBuilder(sources).web(false) - .properties(this.defaultProperties).environment(this.environment); + this.parent = new SpringApplicationBuilder(sources) + .web(WebApplicationType.NONE).properties(this.defaultProperties) + .environment(this.environment); } else { this.parent.sources(sources);