[JAVA-26711] Upgraded shedlock to latest version(5.10.0)

This commit is contained in:
panos-kakos 2023-11-29 17:25:49 +02:00
parent 6ecf4f2bd9
commit 44e565ffe8
3 changed files with 3 additions and 15 deletions

View File

@ -225,7 +225,7 @@
<git-commit-id-plugin.version>2.2.4</git-commit-id-plugin.version>
<modelmapper.version>3.2.0</modelmapper.version>
<problem-spring-web.version>0.23.0</problem-spring-web.version>
<shedlock.version>2.1.0</shedlock.version>
<shedlock.version>5.10.0</shedlock.version>
<barbecue.version>1.5-beta1</barbecue.version>
<barcode4j.version>2.1</barcode4j.version>
<qrgen.version>2.6.0</qrgen.version>

View File

@ -1,13 +1,13 @@
package com.baeldung.scheduling.shedlock;
import net.javacrumbs.shedlock.core.SchedulerLock;
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
class BaeldungTaskScheduler {
@Scheduled(cron = "0 0/15 * * * ?")
@SchedulerLock(name = "TaskScheduler_scheduledTask", lockAtLeastForString = "PT5M", lockAtMostForString = "PT14M")
@SchedulerLock(name = "TaskScheduler_scheduledTask", lockAtLeastFor = "PT5M", lockAtMostFor = "PT14M")
public void scheduledTask() {
System.out.println("Running ShedLock task");
}

View File

@ -119,17 +119,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- ShedLock -->
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-spring</artifactId>
<version>${shedlock.version}</version>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-provider-jdbc-template</artifactId>
<version>${shedlock.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
@ -161,7 +150,6 @@
<annotation-api.version>1.3.2</annotation-api.version>
<!-- util -->
<easymock.version>3.6</easymock.version>
<shedlock.version>2.1.0</shedlock.version>
<javassist.version>3.22.0-GA</javassist.version>
<maven-war-plugin.version.version>3.2.2</maven-war-plugin.version.version>
</properties>