Skip to content

Commit 9f2a30e

Browse files
committed
Fix AOT resource hints in CoreRuntimeHints
Starting with Spring Framework 7, the resource hints syntax has changed from a java.util.regex.Pattern format to a "glob pattern" format [1]. This commit partially reverts 369652c until we find a way to include schema-{h2,derby,...}.sql and exclude schema-drop-*.sql with a glob pattern. Resolves #4937 [1]: https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-7.0-Release-Notes#graalvm-native-applications
1 parent 4e1f10b commit 9f2a30e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/aot/CoreRuntimeHints.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,18 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
9595
"java.util.concurrent.ConcurrentHashMap$Segment");
9696

9797
// resource hints
98-
hints.resources()
99-
.registerPattern(
100-
"org/springframework/batch/core/schema-{h2,derby,hsqldb,sqlite,db2,hana,mysql,mariadb,oracle,postgresql,sqlserver,sybase}.sql");
98+
hints.resources().registerPattern("org/springframework/batch/core/schema-h2.sql");
99+
hints.resources().registerPattern("org/springframework/batch/core/schema-derby.sql");
100+
hints.resources().registerPattern("org/springframework/batch/core/schema-hsqldb.sql");
101+
hints.resources().registerPattern("org/springframework/batch/core/schema-sqlite.sql");
102+
hints.resources().registerPattern("org/springframework/batch/core/schema-db2.sql");
103+
hints.resources().registerPattern("org/springframework/batch/core/schema-hana.sql");
104+
hints.resources().registerPattern("org/springframework/batch/core/schema-mysql.sql");
105+
hints.resources().registerPattern("org/springframework/batch/core/schema-mariadb.sql");
106+
hints.resources().registerPattern("org/springframework/batch/core/schema-oracle.sql");
107+
hints.resources().registerPattern("org/springframework/batch/core/schema-postgresql.sql");
108+
hints.resources().registerPattern("org/springframework/batch/core/schema-sqlserver.sql");
109+
hints.resources().registerPattern("org/springframework/batch/core/schema-sybase.sql");
101110

102111
// proxy hints
103112
hints.proxies()

0 commit comments

Comments
 (0)