<h1> nested exception is org.hibernate.LazyInitializationException:</h1>
*:http://*.com/questions/36106620/failed-to-lazily-initialize-a-collection-of-role-user-authorities-could-not-in
也可以
@ManyToMany(fetch = FetchType.LAZY) ==》 (fetch = FetchType.EAGER)
@Fetch(FetchMode.SUBSELECT)
@JoinTable(
name = "sys_user_role",
joinColumns = { @JoinColumn(name = "role_id") },
inverseJoinColumns = @JoinColumn(name = "user_id")
)
@JsonIgnore
public Set<SysUser> getSysUsers() {
return sysUsers;
} public void setSysUsers(Set<SysUser> sysUsers) {
this.sysUsers = sysUsers;
}