객체
public class Person
private String personId;
private String personName;
private String personAge;
정렬부
public List<Person> getPersonList() {
List<Person> personList = personRepository.findById(personId);
//나이별 정렬 후 이름별 정렬
return personList
.stream()
.sorted(
Comparator.comparing(Person::getPersonAge)
.thenComparing(Person::getPersonName)
)
.toList();
}