source: src/main/java/com/example/rezevirajmasa/demo/component/ReservationScheduler.java

main
Last change on this file was deea3c4, checked in by Aleksandar Panovski <apano77@…>, 3 weeks ago

Big change done fully handle_reservation_update() trigger works

  • Property mode set to 100644
File size: 612 bytes
RevLine 
[deea3c4]1package com.example.rezevirajmasa.demo.component;
2
3import com.example.rezevirajmasa.demo.service.ReservationService;
4import jakarta.annotation.PostConstruct;
5import org.springframework.scheduling.annotation.Scheduled;
6import org.springframework.stereotype.Component;
7
8@Component
9public class ReservationScheduler {
10 private final ReservationService reservationService;
11
12 public ReservationScheduler(ReservationService reservationService) {
13 this.reservationService = reservationService;
14 }
15
16 @PostConstruct
17 void runOnStartup() {
18 reservationService.findReservationsToMove();
19 }
20}
Note: See TracBrowser for help on using the repository browser.