java - 一般怎么发布dubbo服务?
高洛峰
高洛峰 2017-04-18 09:45:57
0
2
445

是这样的。
发布dubbo服务一般有两种方式
1、打包成jar文件直接运行。
2、打包成war文件发布到tomcat等web容器。

我想知道一般用哪一种方式?他们的异同,优缺点又是什么?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
大家讲道理

Both are possible. The first one is to embed web containers, which is also a popular method now. It does not require any dependencies or additional maintenance of the container environment, and it is also decoupled from each other. Imagine you have two applications deployed in the same tomcat, how to isolate them safely? How to use different IP? But if it is in the form of a jar package, you can use technologies such as docker to isolate and use different IPs.

A small weakness of the built-in type is that the bag is a bit larger

黄舟

Quote from the dubbo user manual:

The service container is a standalone startup program, because the background service does not require the functions of Web containers such as Tomcat or JBoss. If you insist on using a Web container to load the service provider, it will increase complexity and waste resources.

The jar file has good running performance and is relatively simple. You can maintain and open/close the dubbo service through scripts.

Of course, if your project itself is a web service, just use tomcat/jboss directly, and maintenance is also convenient

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!