package com.mfsys.controller; import com.mfsys.constant.LoggerURI; import com.mfsys.model.Logger; import com.mfsys.service.LoggerService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.time.LocalDate; import java.util.List; @RestController public class LoggerController { LoggerService loggerService; @Autowired LoggerController(LoggerService loggerService) { this.loggerService = loggerService; } @GetMapping(LoggerURI.GET_LOGS_BY_DATES) public List findLogsBetweenDates(@RequestParam LocalDate fromDate, @RequestParam LocalDate toDate) { return loggerService.findLogsBetweenDates(fromDate, toDate); } }