-
Spring Boot 使用 Jackson 注解将敏感信息脱敏
需求 服务端将个人隐私数据进行脱敏。 实现类似@JsonFormat注解,只在返回给前端时脱敏,其他Service、DAO层不变。 代码 JsonSerializer 序列化器 import com
2024-05-27, Views: 212 , Topics: Spring Boot Jackson
-
Spring Boot使用 Jackson 注解
示例 Bean @Data //@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonIncl
2021-01-07, Views: 1558 , Topics: Spring Boot Jackson JSON
-
Java ObjectMapper 格式化输出 JSON
优雅输出 使用writerWithDefaultPrettyPrinter方法。 public static void main(String[] args)
-
Spring Boot 不返回为 null 的 JSON 字段
方法一 可标注在类、方法、字段、参数、注解上 @JsonInclude(JsonInclude.Include.NON_NULL) 方法二 applicatio
2019-06-26, Views: 5186 , Topics: Spring Boot Jackson JSON