From a9f3904ca02682bdf5f79cf8092793eca25a9257 Mon Sep 17 00:00:00 2001 From: Georg Echterling Date: Thu, 16 May 2024 09:37:56 +0200 Subject: [PATCH] fix: Respect always-persist-timestamp-in-utc in Spring Starter (#487) --- .../boot/autoconfigure/DbSchedulerAutoConfiguration.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/db-scheduler-boot-starter/src/main/java/com/github/kagkarlsson/scheduler/boot/autoconfigure/DbSchedulerAutoConfiguration.java b/db-scheduler-boot-starter/src/main/java/com/github/kagkarlsson/scheduler/boot/autoconfigure/DbSchedulerAutoConfiguration.java index 3162dc7a..ecfe6940 100644 --- a/db-scheduler-boot-starter/src/main/java/com/github/kagkarlsson/scheduler/boot/autoconfigure/DbSchedulerAutoConfiguration.java +++ b/db-scheduler-boot-starter/src/main/java/com/github/kagkarlsson/scheduler/boot/autoconfigure/DbSchedulerAutoConfiguration.java @@ -23,7 +23,6 @@ import com.github.kagkarlsson.scheduler.boot.config.startup.ContextReadyStart; import com.github.kagkarlsson.scheduler.boot.config.startup.ImmediateStart; import com.github.kagkarlsson.scheduler.exceptions.SerializationException; -import com.github.kagkarlsson.scheduler.jdbc.AutodetectJdbcCustomization; import com.github.kagkarlsson.scheduler.serializer.Serializer; import com.github.kagkarlsson.scheduler.stats.StatsRegistry; import com.github.kagkarlsson.scheduler.task.OnStartup; @@ -146,10 +145,7 @@ public Scheduler scheduler(DbSchedulerCustomizer customizer, StatsRegistry regis builder.serializer(customizer.serializer().orElse(SPRING_JAVA_SERIALIZER)); // Use custom JdbcCustomizer if provided. - builder.jdbcCustomization( - customizer - .jdbcCustomization() - .orElse(new AutodetectJdbcCustomization(transactionalDataSource))); + customizer.jdbcCustomization().ifPresent(builder::jdbcCustomization); if (config.isAlwaysPersistTimestampInUtc()) { builder.alwaysPersistTimestampInUTC();