source:
src/main/java/com/example/skychasemk/controller/TopMonthlyReportController.java
Last change on this file was 62bba0c, checked in by , 4 months ago | |
---|---|
|
|
File size: 612 bytes |
Rev | Line | |
---|---|---|
[a70b5a4] | 1 | package com.example.skychasemk.controller; |
2 | ||
3 | import com.example.skychasemk.model.TopMonthlyReport; | |
[62bba0c] | 4 | import com.example.skychasemk.repository.TopMonthlyReportRepository; |
[a70b5a4] | 5 | import org.springframework.beans.factory.annotation.Autowired; |
[62bba0c] | 6 | import org.springframework.ui.Model; |
[a70b5a4] | 7 | import org.springframework.web.bind.annotation.*; |
8 | ||
9 | import java.util.List; | |
10 | ||
11 | @RestController | |
[62bba0c] | 12 | @RequestMapping("/api/views") |
[a70b5a4] | 13 | public class TopMonthlyReportController { |
14 | @Autowired | |
[62bba0c] | 15 | private TopMonthlyReportRepository repository; |
16 | ||
[a70b5a4] | 17 | |
[62bba0c] | 18 | @GetMapping |
[a70b5a4] | 19 | public List<TopMonthlyReport> getAllReports() { |
[62bba0c] | 20 | return repository.findAll(); |
[a70b5a4] | 21 | } |
22 | ||
23 | } |
Note:
See TracBrowser
for help on using the repository browser.