The present application belongs to the technical field of installation
package deployment, and specifically discloses a method for reducing
Jar package volume and rapid deployment, which improves the accuracy and safety during
recovery under the premise of effectively reducing the
Jar package volume. In order to achieve the purpose, the present application comprises a slimming
Jar construction packaging stage, a global public dependent package hierarchical construction and storage stage, and a business package dynamic
recovery stage; the generated business Jar package is subjected to minimization
processing, and then the global public dependent package hierarchical construction is performed, only the
business logic code and necessary dependent
metadata are retained; the original Jar is traversed, only the non-stripped dependent is written, the full dependent sequence
list and the actual non-written dependent
list are recorded and stored synchronously; dynamic
recovery is performed as needed. According to the technical scheme, the business package volume is reduced by 60%-80%, the file download time consumption during cluster deployment is reduced by more than 90%, and it is ensured that the recovered Jar package is 100% consistent with the original package in structure and dependent sequence, so that service startup failure is avoided.