[JAVA-26046] Upgraded spring-scheduling to spring boot 3 (#14939)
This commit is contained in:
parent
6d7040879b
commit
f2e1547920
|
@ -10,9 +10,9 @@
|
|||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<artifactId>parent-boot-3</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
<relativePath>../parent-boot-3</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -33,21 +33,19 @@
|
|||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>${annotation-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<spring-retry.version>2.0.0</spring-retry.version>
|
||||
<annotation-api.version>1.3.2</annotation-api.version>
|
||||
<spring-retry.version>2.0.3</spring-retry.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -37,7 +37,7 @@ public class DynamicSchedulingConfig implements SchedulingConfigurer {
|
|||
Instant nextExecutionTime =
|
||||
lastCompletionTime.orElseGet(Date::new).toInstant()
|
||||
.plusMillis(tickService.getDelay());
|
||||
return Date.from(nextExecutionTime);
|
||||
return Date.from(nextExecutionTime).toInstant();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.baeldung.taskscheduler;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
||||
|
|
Loading…
Reference in New Issue