Question: I have a simple Spring Boot application that gets messages from a JMS queue and saves some data to a log file, but does not need a web server. Is there any way of starting Spring Boot without the web server?

Answer: 
The simplest solution. in your application.properties file. add the following property as mentioned by a previous answer:

> 
> spring.main.web-environment=false
> 
> 
> 

For version 2.0.0 of Spring boot starter, use the following property :

> 
> spring.main.web-application-type=none
> 
> 
> 

For documentation on all properties use this link : <https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html>
If you want to use one of the "Getting Started" templates from spring.io site, but you don't need any of the servlet-related stuff that comes with the "default" ("gs/spring-boot") template, you can try the scheduling-tasks template (whose pom\* contains spring-boot-starter etc) instead:

<https://spring.io/guides/gs/scheduling-tasks/>

That gives you Spring Boot, and the app runs as a standalone (no servlets or spring-webmvc etc are included in the pom). Which is what you wanted (though you may need to add some JMS-specific stuff, as someone else points out already).

[\* I'm using Maven, but assume that a Gradle build will work similarly].