From 31441a759089de02698cb3fd126931ff3e859b50 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 13 Apr 2018 15:18:08 +0200 Subject: [PATCH 1/2] Add a note to explain how to disable the web server See gh-12853 --- .../spring-boot-docs/src/main/asciidoc/howto.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc index 41a20872d5c..ad98cfe10d2 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -569,6 +569,19 @@ server. +[[howto-use-another-web-server]] +=== Disabling the Web Server +If your classpath contains the necessary bits to start a web server, Spring Boot will +automatically start it. To disable this behaviour configure the `WebApplicationType` in +your `application.properties`, as shown in the following example: + +[source,properties,indent=0] +---- + spring.main.web-application-type=none +---- + + + [[howto-configure-jetty]] === Configure Jetty Generally, you can follow the advice from From 2204d5f750be19de22225ea54336f2d68162f0bf Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Fri, 13 Apr 2018 15:18:42 +0200 Subject: [PATCH 2/2] Polish --- .../spring-boot-docs/src/main/asciidoc/howto.adoc | 3 --- 1 file changed, 3 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc index ad98cfe10d2..54cc342049f 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -516,9 +516,6 @@ includes Tomcat by including `spring-boot-starter-tomcat`, but you can use `spring-boot-starter-reactor-netty`, but you can use `spring-boot-starter-tomcat`, `spring-boot-starter-jetty`, or `spring-boot-starter-undertow` instead. -NOTE: Many starters support only Spring MVC, so they transitively bring -`spring-boot-starter-web` into your application classpath. - If you need to use a different HTTP server, you need to exclude the default dependencies and include the one you need. Spring Boot provides separate starters for HTTP servers to help make this process as easy as possible.