Browse Source

:tada: 添加全局报文加密配置

smallchill 6 năm trước cách đây
mục cha
commit
3810623a77
2 tập tin đã thay đổi với 15 bổ sung1 xóa
  1. 4 0
      pom.xml
  2. 11 1
      src/main/resources/application.yml

+ 4 - 0
pom.xml

@@ -74,6 +74,10 @@
             <groupId>org.springblade</groupId>
             <artifactId>blade-starter-http</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-api-crypto</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-starter-datascope</artifactId>

+ 11 - 1
src/main/resources/application.yml

@@ -130,13 +130,23 @@ blade:
   token:
     #是否有状态
     state: false
+  #接口配置
+  api:
+    #报文加密配置
+    crypto:
+      #启用报文加密配置
+      enabled: false
+      #使用AesUtil.genAesKey()生成
+      aes-key: O2BEeIv399qHQNhD6aGW8R8DEj4bqHXm
+      #使用DesUtil.genDesKey()生成
+      des-key: jMVCBsFGDQr1USHo
   #jackson配置
   jackson:
     #null自动转空值
     null-to-empty: true
     #大数字自动转字符串
     big-num-to-string: true
-    #支持text文本
+    #支持text文本请求,与报文加密同时开启
     support-text-plain: false
   #xss配置
   xss: