Scenario: Small L recently released the app when it comes to a headache, because the Apple App Store needs audit reasons, the project needs to deploy the latest version, but can not affect the normal use of the version;
Analyze the problem: if it's an app-related bug, or a pre-release version
Solution: Configure Dubbo Multiple Versions
<dubbo:protocol id= "Customerrest" name= "Rest" port= "xxxxx"/><!--ref: Service implementation to inject--><dubbo:service Interface= "Com.jlj.erp.app.dubbo.service.customer.CustomerApi" ref= "Customerapi" version= "1.0" group= " Group-customer "protocol=" Customerrest "timeout=" 60000 "/><!--ref: Service implementation to inject--><dubbo:service Interface= "Com.jlj.erp.app.dubbo.service.customer.CustomerApi" ref= "Customervapi" version= "1.1" group= " Group-customer "protocol=" Customerrest "timeout=" 60000 "/>
Implement the same interface, Only the corresponding version of the interface from 1.0 to 1.1, according to the requirements of the 1.1 version of the interface implementation, so that when the release, the new and old interface will coexist, if you need to force the update audit after the old version (1.0 version of the code removed) to stop running the new version, if you do not need to force the update, it can coexist
Client calls, small L with Dubbox so different versions configure different paths to
HTTP://127.0.0.1:80/A//XXX/V1 (old) @GET @path ("/xxx/v1") public Apiresult xxx (@QueryParam ("code") String Resourcecode) Http://127.0.0.1:80/a//xxx/v2 (new) @GET @path ("/xxx/v2") public Apiresult xxx (@QueryParam ("code") String Resourcecode)
If the data structure is changed, small l do not recommend this way
This situation requires a specific solution, can be deployed separately, can be pre-release environment, deployment of 1 with the new table structure and objects of the test database (pre-release environment).
For the larger changes, the product added new heavyweight features, the business level or the underlying table structure is incompatible, the recommendation is to do a mandatory upgrade.
Dubbox Server configuration for multi-version release of the APP