zjh
2025-05-13 bd1618cb6bdae1da53fd21df7afbd4962278f9c8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.ltkj.common.filter;
 
import com.alibaba.fastjson2.filter.SimplePropertyPreFilter;
 
/**
 * 排除JSON敏感属性
 *
 * @author ltkj
 */
public class PropertyPreExcludeFilter extends SimplePropertyPreFilter {
    public PropertyPreExcludeFilter() {
    }
 
    public PropertyPreExcludeFilter addExcludes(String... filters) {
        for (int i = 0; i < filters.length; i++) {
            this.getExcludes().add(filters[i]);
        }
        return this;
    }
}