没有Web服务器的Spring Boot [英] Spring Boot without the web server

查看:173
本文介绍了没有Web服务器的Spring Boot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的Spring Boot应用程序,该应用程序从JMS队列获取消息并将一些数据保存到日志文件,但不需要Web服务器.没有Web服务器,有什么方法可以启动Spring Boot吗?

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?

推荐答案

如果您在类路径上没有Tomcat依赖项,则Spring Boot将不包含嵌入式tomcat. 您可以在类EmbeddedServletContainerAutoConfiguration上自己查看此事实,您可以在其源中找到

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.

代码的重点是在类EmbeddedTomcat

此外,有关更多信息,请查看指南和

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

这篇关于没有Web服务器的Spring Boot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆