@RequestMapping( method = RequestMethod.GET, params = {"fromDate", "toDate"}) public List<AuditEvent> getByDates( @RequestParam(value = "fromDate") LocalDateTime fromDate, @RequestParam(value = "toDate") LocalDateTime toDate) { return auditEventService.findByDates(fromDate, toDate); }
@RequestMapping(value = "/{id:.+}", method = RequestMethod.GET) public ResponseEntity<AuditEvent> get(@PathVariable Long id) { return auditEventService .find(id) .map((entity) -> new ResponseEntity<>(entity, HttpStatus.OK)) .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND)); }
@RequestMapping(method = RequestMethod.GET) public List<AuditEvent> getAll() { return auditEventService.findAll(); }