0
点赞
收藏
分享

微信扫一扫

JPA 中 failed to lazily initialize a collection of role: com.test.security.rbac.domain.Resource.urls

余寿 2022-07-12 阅读 31
编程语言

 

failed to lazily initialize a collection of role: com.test.security.rbac.domain.Resource.urls, could not initialize proxy - no Session

 

原:

......
/**
* 实际需要控制权限的url
*/
@ElementCollection
private Set<String> urls;
......

 

新:

......
/**
* 实际需要控制权限的url
*/fetch =FetchType.EAGER)
private Set<String> urls;
.....

 

网上说的原因是惰加引用的错误



举报

相关推荐

0 条评论