publish 1.0.24-test

This commit is contained in:
曾文豪
2024-04-15 12:31:15 +08:00
parent c2fe494ed9
commit a7024f7a8d
12 changed files with 23 additions and 21 deletions

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.io.IoUtil;
import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import cn.hutool.log.LogFactory;
import com.tiesheng.util.config.EncryptConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.MethodParameter;
@@ -66,6 +67,7 @@ public class DecryptRequestBodyAdvice implements RequestBodyAdvice {
DecryptHttpInputMessage(HttpInputMessage inputMessage, EncryptConfig encryptConfig) throws Exception {
this.headers = inputMessage.getHeaders();
String bodyStr = IoUtil.read(inputMessage.getBody(), CharsetUtil.CHARSET_UTF_8);
LogFactory.get().info("DecryptRequestBodyAdvice: " + bodyStr);
String encryptData = JSONUtil.parseObj(bodyStr).getStr("encryptData");
if (!StrUtil.isEmpty(encryptData)) {
String decrypt = encryptConfig.decrypt(encryptData);