当前位置:网站首页>7.2.3 gzip one click compression tool - "SSM in depth analysis and project practice"

7.2.3 gzip one click compression tool - "SSM in depth analysis and project practice"

2020-11-06 01:14:29 Memory

All the source code in the project can be found in the linked repository :https://github.com/chenhaoxiang/uifuture-ssm

7.2.3 GZIP One click compression tool

In the project , In order to facilitate the compression of static files , I wrote a GZIP The compression tool class of . It can compress recursively with one key ”resources/static” All the files in the directory , And keep the original document . First create a file utility class , Such as code list 7-17 Shown .

File Tool class

Code list 7-17:File Tool class

/**
 *  File tool class  -  auxiliary GZIP Compress 
 */
public class FileUtils {
   
    
    /**
     *  Save byte array to file file 
     * @param filePath
     * @param 

版权声明
本文为[Memory]所创,转载请带上原文链接,感谢