【代码优化】全局:Area 在 IDEA debug 时 toString 方法报错StackOverflowError、指定 jackson 默认序列化时双向引用的前向、后向出口避免死循环报错

Signed-off-by: 常柯柯 <88455621@qq.com>
This commit is contained in:
常柯柯 2024-07-29 09:40:13 +00:00 committed by Gitee
parent 934b0ef69c
commit 18cf9e55e1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.framework.ip.core; package cn.iocoder.yudao.framework.ip.core;
import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference; import com.fasterxml.jackson.annotation.JsonManagedReference;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
@ -54,7 +55,7 @@ public class Area {
/** /**
* 子节点 * 子节点
*/ */
@JsonManagedReference @JsonBackReference
private List<Area> children; private List<Area> children;
} }