liukefu2050 commented on issue #10459:
URL: https://github.com/apache/dubbo/issues/10459#issuecomment-1216069212
我感觉不会是延迟加载问题,LazyLoadUtil.fullLoad(page); 方法应该已经加载了
```
@DubboService(interfaceClass=CustomService.class,filter =
"userFilter",retries = 0)
public class CustomServiceImpl extends BaseServiceImpl<CustomEntity>
implements CustomService {
@Transactional(readOnly = true)
public PageTableVO findPageList(CustomSearchVo searchPageVo) {
...
Page<CustomEntity> page = findPageList(ex,
searchPageVo.createPageRequest(new Sort.Order(dir, "lastContactDate")));
//请注意下面这行代码
LazyLoadUtil.fullLoad(page);
PageTableVO vo = new PageTableVO(page, searchPageVo);
return vo;
}
}
public class LazyLoadUtil {
public synchronized static void fullLoad(Object object) {
if(object == null)
return;
JSON.toJSONString(object, new LazyLoadFilter());
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]