From 7ed8c7c94f13fe0708cfd7fe7e9010a2d5f971c2 Mon Sep 17 00:00:00 2001 From: John Blum Date: Thu, 4 Oct 2018 14:06:55 -0700 Subject: [PATCH] Switch from using SpringApplication to SpringApplicationBuilder to boostrap the application class. --- .../SpringBootApacheGeodeCacheServerApplication.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spring-geode-docs/src/main/java/org/springframework/geode/docs/example/app/server/SpringBootApacheGeodeCacheServerApplication.java b/spring-geode-docs/src/main/java/org/springframework/geode/docs/example/app/server/SpringBootApacheGeodeCacheServerApplication.java index 5a7bd224..8f1a4926 100644 --- a/spring-geode-docs/src/main/java/org/springframework/geode/docs/example/app/server/SpringBootApacheGeodeCacheServerApplication.java +++ b/spring-geode-docs/src/main/java/org/springframework/geode/docs/example/app/server/SpringBootApacheGeodeCacheServerApplication.java @@ -16,8 +16,9 @@ package org.springframework.geode.docs.example.app.server; -import org.springframework.boot.SpringApplication; +import org.springframework.boot.WebApplicationType; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.data.gemfire.config.annotation.CacheServerApplication; @@ -32,7 +33,11 @@ import org.springframework.geode.config.annotation.UseLocators; public class SpringBootApacheGeodeCacheServerApplication { public static void main(String[] args) { - SpringApplication.run(SpringBootApacheGeodeCacheServerApplication.class, args); + + new SpringApplicationBuilder(SpringBootApacheGeodeCacheServerApplication.class) + .web(WebApplicationType.NONE) + .build() + .run(args); } @Configuration