Commit c69d502fde8002a67b29c3588fa81fefd3c2087d
Committed by
Gitee
!1022 【优化】idea在debug时toString方法报错StackOverflowError、指定jackson默认序列化时双向引用的前向、后向出口避免死循环报错
Merge pull request !1022 from 常柯柯/master-jdk17
Showing
1 changed file
with
2 additions
and
1 deletions
yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/Area.java
| 1 | 1 | package cn.iocoder.yudao.framework.ip.core; |
| 2 | 2 | |
| 3 | 3 | import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; |
| 4 | +import com.fasterxml.jackson.annotation.JsonBackReference; | |
| 4 | 5 | import com.fasterxml.jackson.annotation.JsonManagedReference; |
| 5 | 6 | import lombok.AllArgsConstructor; |
| 6 | 7 | import lombok.Data; |
| ... | ... | @@ -54,7 +55,7 @@ public class Area { |
| 54 | 55 | /** |
| 55 | 56 | * 子节点 |
| 56 | 57 | */ |
| 57 | - @JsonManagedReference | |
| 58 | + @JsonBackReference | |
| 58 | 59 | private List<Area> children; |
| 59 | 60 | |
| 60 | 61 | } | ... | ... |