Skip to content

Commit

Permalink
[FIX] 누락된 어노테이션 추가 및 클래스명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
yeseul106 committed Jan 23, 2024
1 parent c7549fd commit d4741a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@
import java.util.List;
import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
import org.springframework.cglib.core.Local;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.time.LocalDate;
import java.time.temporal.ChronoUnit;
import java.util.Comparator;
import java.util.List;


@Service
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@

import com.example.growthookserver.api.seed.repository.SeedRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

@Component
@EnableScheduling
@RequiredArgsConstructor
public class SchedulerUtil {
public class SeedScheduler {

private final SeedRepository seedRepository;
@Scheduled(cron = "0 0 0 * * *", zone = "Asia/Seoul")
@Transactional
public void updateLockStatusForExpiredSeeds() {
int updatedCount = seedRepository.updateLockStatusForExpiredSeeds();
System.out.println("Updated " + updatedCount + " seeds.");
}
}

0 comments on commit d4741a4

Please sign in to comment.