ihar_hancharenka 21a741160a m
2025-10-16 11:50:31 +03:00

42 строки
1.4 KiB
Plaintext

https://github.com/lukas-krecan/ShedLock
https://mvnrepository.com/artifact/net.javacrumbs.shedlock
baeldung
https://www.baeldung.com/shedlock-spring
2025
Lviv JavaClub [Event 388] ShedLock by Serhii Petrenko 0:00 of ...
https://www.youtube.com/watch?v=ht5xUy4cEEQ
2023
https://jetherrodrigues.dev.br/efficient-job-scheduling-and-locking-in-spring-boot-applications-quartz-vs-shedlock-b3ccca18cfe5
https://medium.com/@marcoscarneirolima/scheduler-lock-using-spring-shedlock-b9ac3e51a934
2021
https://42talents.com/blog/2021/08/29/shedlock-with-spring-boot/
http://buraktas.com/spring-shedlock-tutorial/
https://habr.com/ru/articles/580062/
good comment
2020
https://for-each.dev/lessons/b/-shedlock-spring
samples
@EnableScheduling
@EnableSchedulerLock(defaultLockAtMostFor = "PT60S")
@Configuration
public class ShedLockConfig {
@Bean
public LockProvider lockProvider(DataSource dataSource) {
return new JdbcTemplateLockProvider(JdbcTemplateLockProvider.Configuration
.builder()
.withJdbcTemplate(new JdbcTemplate(dataSource))
.usingDbTime() // Use database time for locks
.build());
}
}
spring/shedlock-spring/src/main/java/net/javacrumbs/shedlock/spring/aop/SpringLockConfigurationExtractor.java
private final Converter<String, Duration> durationConverter;
Duration result = durationConverter.convert(stringValueFromAnnotation);