1package com.student_loan.controller;
5import org.springframework.http.ResponseEntity;
6import org.springframework.web.bind.annotation.GetMapping;
7import org.springframework.web.bind.annotation.RequestMapping;
8import org.springframework.web.bind.annotation.RestController;
10import com.student_loan.dtos.RankingDTO;
11import com.student_loan.service.RankingService;
14@RequestMapping(
"/api/ranking")
16 private final RankingService rankingService;
19 this.rankingService = rankingService;
24 List<RankingDTO> ranking = rankingService.getRanking();
25 return ResponseEntity.ok(ranking);
RankingController(RankingService rankingService)
ResponseEntity< List< RankingDTO > > getAllRankings()