@JsonIgnore
@OneToMany(mappedBy = "school",fetch = FetchType.LAZY)
private List<Student> students = new ArrayList<>();
这里可以缓存,但是读缓存的时候list就为空了。又没有其他什么方法能处理的。
@JsonIgnore
@OneToMany(mappedBy = "school",fetch = FetchType.LAZY)
private List<Student> students = new ArrayList<>();
这里可以缓存,但是读缓存的时候list就为空了。又没有其他什么方法能处理的。