mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
【代码优化】全局:Area 在 IDEA debug 时 toString 方法报错StackOverflowError、指定 jackson 默认序列化时双向引用的前向、后向出口避免死循环报错
This commit is contained in:
parent
d14868b459
commit
ad22a9d516
@ -1,9 +1,11 @@
|
||||
package cn.iocoder.yudao.framework.ip.core;
|
||||
|
||||
import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum;
|
||||
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -17,6 +19,7 @@ import java.util.List;
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString(exclude = {"parent"}) // 参见 https://gitee.com/yudaocode/yudao-cloud-mini/pulls/2 原因
|
||||
public class Area {
|
||||
|
||||
/**
|
||||
@ -46,10 +49,12 @@ public class Area {
|
||||
/**
|
||||
* 父节点
|
||||
*/
|
||||
@JsonManagedReference
|
||||
private Area parent;
|
||||
/**
|
||||
* 子节点
|
||||
*/
|
||||
@JsonManagedReference
|
||||
private List<Area> children;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user