From 06c2dc3a0137eba78a9fff9abe58eac7854c1386 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Mon, 12 Sep 2022 07:41:14 +0200 Subject: [PATCH] Refine contribution #4187 Add resource hints for all supported databases --- .../batch/core/aot/CoreRuntimeHints.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/aot/CoreRuntimeHints.java b/spring-batch-core/src/main/java/org/springframework/batch/core/aot/CoreRuntimeHints.java index 9798df6d1..b8a406c66 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/aot/CoreRuntimeHints.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/aot/CoreRuntimeHints.java @@ -26,6 +26,7 @@ import org.springframework.core.DecoratingProxy; * {@link RuntimeHintsRegistrar} for Spring Batch core module. * * @author Glenn Renfro + * @author Mahmoud Ben Hassine * @since 5.0 */ public class CoreRuntimeHints implements RuntimeHintsRegistrar { @@ -34,6 +35,16 @@ public class CoreRuntimeHints implements RuntimeHintsRegistrar { public void registerHints(RuntimeHints hints, ClassLoader classLoader) { hints.resources().registerPattern("org/springframework/batch/core/schema-h2.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-derby.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-hsqldb.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-sqlite.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-db2.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-hana.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-mysql.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-oracle.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-postgresql.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-sqlserver.sql"); + hints.resources().registerPattern("org/springframework/batch/core/schema-sybase.sql"); hints.proxies() .registerJdkProxy(builder -> builder