From bdd2cd4b25acaa2582a9771db6420136603bd707 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Sat, 1 Oct 2022 12:08:40 +0200 Subject: [PATCH] Update core native hints This commit adds a: * JDK proxy hint for JobExplorer * Reflection hint for fields of java.sql.Types --- .../springframework/batch/core/aot/CoreRuntimeHints.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 b8a406c66..7bd01272c 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 @@ -15,8 +15,11 @@ */ package org.springframework.batch.core.aot; +import java.sql.Types; + import org.springframework.aop.SpringProxy; import org.springframework.aop.framework.Advised; +import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.RuntimeHintsRegistrar; import org.springframework.aot.hint.TypeReference; @@ -48,9 +51,11 @@ public class CoreRuntimeHints implements RuntimeHintsRegistrar { hints.proxies() .registerJdkProxy(builder -> builder - .proxiedInterfaces(TypeReference.of("org.springframework.batch.core.repository.JobRepository")) + .proxiedInterfaces(TypeReference.of("org.springframework.batch.core.repository.JobRepository"), + TypeReference.of("org.springframework.batch.core.explore.JobExplorer")) .proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class)); + hints.reflection().registerType(Types.class, MemberCategory.DECLARED_FIELDS); } }