Spring Boot without the web server

后端 未结 16 802
眼角桃花
眼角桃花 2020-11-29 16:50

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 S

16条回答
  •  一向
    一向 (楼主)
    2020-11-29 17:08

    Spring boot will not include embedded tomcat if you don't have Tomcat dependencies on the classpath. You can view this fact yourself at the class EmbeddedServletContainerAutoConfiguration whose source you can find here.

    The meat of the code is the use of the @ConditionalOnClass annotation on the class EmbeddedTomcat


    Also, for more information check out this and this guide and this part of the documentation

提交回复
热议问题