jpa中PageRequest @Deprecated和Sort @Deprecated的最新使用方法

简介: jpa中PageRequest @Deprecated和Sort @Deprecated的最新使用方法


  • PageRequest.of替代new PageRequest
  • Sort.by 替代new Sort
Sort sort = Sort.by(Sort.Direction.ASC,"name");
List list = new ArrayList();
list.add(new Sort.Order(Sort.Direction.ASC, "name"));
Sort sort = Sort.by(list);
PageRequest pageRequest = PageRequest.of(1,5,sort);


相关文章
|
小程序 JavaScript API
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ?
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ?
829 0
|
6月前
|
机器学习/深度学习 数据处理 Python
【Python】已解决:FutureWarning: Function get_feature_names is deprecated; get_feature_names is deprecated
【Python】已解决:FutureWarning: Function get_feature_names is deprecated; get_feature_names is deprecated
133 0
|
6月前
|
开发者 Python
【Python】已解决:TypeError: descriptor ‘index‘ for ‘list‘ objects doesn‘t apply to a ‘str‘ object
【Python】已解决:TypeError: descriptor ‘index‘ for ‘list‘ objects doesn‘t apply to a ‘str‘ object
162 0
DeprecationWarning:current URL string parser is deprecated, and will be removed in a future version.
DeprecationWarning:current URL string parser is deprecated, and will be removed in a future version.
|
PyTorch 算法框架/工具
Pytorch报错:AttributeError: ‘version_info‘ object has no attribute ‘__version__‘
Pytorch报错:AttributeError: ‘version_info‘ object has no attribute ‘__version__‘
189 0
【问题记录】utureWarning: Function get_feature_names is deprecated; get_feature_names is deprecated in 1.0
【问题记录】utureWarning: Function get_feature_names is deprecated; get_feature_names is deprecated in 1.0
|
API Python
全网首发:warning: #warning “Using deprecated NumPy API, disable it by “ “#defining NPY_NO_DEPRECATED_API
全网首发:warning: #warning “Using deprecated NumPy API, disable it by “ “#defining NPY_NO_DEPRECATED_API
289 0
|
TensorFlow 算法框架/工具
成功解决To fix this you could try to: 1. loosen the range of package versions you‘ve specified ​​​​​​​
成功解决To fix this you could try to: 1. loosen the range of package versions you‘ve specified ​​​​​​​
成功解决To fix this you could try to: 1. loosen the range of package versions you‘ve specified ​​​​​​​
|
API
'getColor(int)' is deprecated ,getColor过时
'getColor(int)' is deprecated ,getColor过时
275 0
'getColor(int)' is deprecated ,getColor过时
|
API
'getWidth()' is deprecated,'getHeight()' is deprecated
'getWidth()' is deprecated,'getHeight()' is deprecated
148 0
'getWidth()' is deprecated,'getHeight()' is deprecated