Dubbo Summary (5)--Build an executable jar package using Maven

Source: Internet
Author: User

There are about three ways to start the Dubbo service.

1.servlet container similar to Tomcat

2. Self-built main method, using spring

3. Use the Main method provided by the Dubbo

Pros and Cons Analysis:

Using a servlet container can make port management complex and memory unnecessarily wasteful. Using the self-built main method, without the use of the official Main method will cause an unpredictable error, using the main method provided by the Dubbo itself, you can achieve graceful shutdown.

Graceful shutdown My understanding is that the service is stopped when all the services are well-coordinated.

Here is the code for the Main method

In the construction process, it is particularly important to note that the configuration of the Maven Pom.xml file is also affixed to this section of code







Welcome to Technical Exchange QQ329790217

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Dubbo Summary (5)--Build an executable jar package using Maven

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.