Spring boot JPA 에서 Repository.findAll() 으로 전체 조회하다가 상위 N개만 찾고 싶을 때는 아주 간단하다.
Repository.findAll()
findTopNByOrderByColumnNameDesc()
Repository에 List<TagCount> findTop10ByOrderByTagCountDesc(); 추가
List<TagCount> findTop10ByOrderByTagCountDesc();
Service에 tagCountRepository.findTop10ByOrderByTagCountDesc();
tagCountRepository.findTop10ByOrderByTagCountDesc();