private OrderSpecifier>[] getSortedColumn(Sort sorts){
return sorts.toList().stream().map(x ->{
Order order = x.getDirection().name() == "ASC"? Order.ASC : Order.DESC;
SimplePath
then you can use like this:
.where(...),
.orderBy(getSortedColumn(pageable.getSort()))