【发布时间】:2020-09-22 09:17:37
【问题描述】:
我有一个 Spring Boot 应用程序,它需要记录所有内容,因此我将其置于 DEBUG 级别,但问题是我需要隐藏来自传入请求的敏感数据 例如,我看到这样的日志:
2020-09-22 12:07:27,626 DEBUG 3484 --- [org.apache.coyote.http11.Http11InputBuffer]: Received [POST /rest/api/authenticate/login HTTP/1.1
Content-Type: application/json
Accept: application/json
User-Agent: PostmanRuntime/7.26.5
Postman-Token: ac1ae730-5f56-48b0-b73c-0225b681a85e
Host: localhost:8988
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 75
{
"email": "test",
"password": "test"
}]
我需要从电子邮件和密码中隐藏测试值。有没有办法做到这一点?我只看到了如何禁用 Http11InputBuffer
【问题讨论】:
标签: spring-boot tomcat