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