Browse Source

perf[litemall-all]: 启用gzip压缩传输

Junling Bu 5 years ago
parent
commit
e763daa27f
2 changed files with 26 additions and 0 deletions
  1. 22 0
      doc/performance.md
  2. 4 0
      litemall-all/src/main/resources/application.yml

+ 22 - 0
doc/performance.md

@@ -0,0 +1,22 @@
+# 性能
+
+## 1 小程序性能
+
+## 2 VUE性能
+
+## 3 Spring Boot性能
+
+### 3.1 gzip压缩
+
+在litemall-all模块中配置gzip压缩
+```
+server:
+  compression:
+    enabled: true
+    min-response-size: 2048
+    mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
+```
+
+## 4 数据库性能
+
+## 5 其他

+ 4 - 0
litemall-all/src/main/resources/application.yml

@@ -6,6 +6,10 @@ spring:
 
 server:
   port: 8080
+  compression:
+    enabled: true
+    min-response-size: 2048
+    mime-types: application/javascript,text/css,application/json,application/xml,text/html,text/xml,text/plain
 
 logging:
   config: classpath:logback-spring.xml