在生产中将Tomcat用于Spring Boot应用程序 [英] Using Tomcat in Production for Spring Boot apps

查看:88
本文介绍了在生产中将Tomcat用于Spring Boot应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为Spring Boot的新手,我需要了解以下内容,因为我无法直接找到google结果. 他们实际使用哪些应用服务器来实际部署那些Spring Boot应用程序? 公司是否真的使用过Tomcat?如果这样,他们是否可以通过集群来实现?

As a novice with Spring Boot , I need to know the following as I could not find google results in a straight forward manner. What application servers do they really use for deploying those Spring Boot applications in real life? Is Tomcat really used by companies - if so do they achieve it using clustering?

推荐答案

Spring boot具有内置的Tomcat服务器,它仅从Java运行.

Spring boot has an inbuilt Tomcat server, it's simply run from Java.

Tomcat内置在jar中,因此在任何环境中都是相同的.

The Tomcat is built into the jar, so it's the same in any environment.

这是一个典型的弹簧靴子罐,上面显示了tomcat罐子:

Here is a typical spring boot jar, with the tomcat jars shown:

greg@greg-XPS-13-9360:~/work/boot-docker/target$ jar tvf boot-docker-1.0.3.jar | grep tomcat
  2293 Mon Jan 30 19:45:14 GMT 2017 BOOT-INF/lib/spring-boot-starter-tomcat-1.5.1.RELEASE.jar
241640 Tue Jan 10 21:03:52 GMT 2017 BOOT-INF/lib/tomcat-embed-websocket-8.5.11.jar
3015953 Tue Jan 10 21:03:50 GMT 2017 BOOT-INF/lib/tomcat-embed-core-8.5.11.jar
239791 Tue Jan 10 21:03:50 GMT 2017 BOOT-INF/lib/tomcat-embed-el-8.5.11.jar

我们将Spring Boot应用程序作为docker镜像(完整的虚拟Unix服务器)在Redhat Openshift云上运行,这很典型.

We run our spring boot applications as docker images (complete virtual Unix server) on Redhat Openshift cloud, which is typical.

BTW Tomcat已在商业上使用,非常可靠.

BTW Tomcat is used commercially and is very reliable.

这篇关于在生产中将Tomcat用于Spring Boot应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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