cl
22 小时以前 c4bba32b20f0869b45ed14be04543869dd91ee6c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.vincent.rsf.httpaudit.model;
 
import lombok.Value;
 
/**
 * 是否写入审计及规则上的请求/响应截断(-1 全量,null 用 yml 默认)
 */
@Value
public class HttpAuditDecision {
 
    public static final HttpAuditDecision SKIP = new HttpAuditDecision(false, null, null);
 
    /** 是否写入审计表 */
    boolean audit;
    /** 请求体入库最大字符,-1 不截断 */
    Integer requestMaxChars;
    /** 响应体入库最大字符,-1 不截断 */
    Integer responseMaxChars;
 
    public static HttpAuditDecision yes(Integer requestMaxChars, Integer responseMaxChars) {
        return new HttpAuditDecision(true, requestMaxChars, responseMaxChars);
    }
}