Skip to content

Commit bc92c4a

Browse files
committed
Add native reflection hints for Job/Step contexts
1 parent 5da133a commit bc92c4a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import org.springframework.aot.hint.RuntimeHints;
2424
import org.springframework.aot.hint.RuntimeHintsRegistrar;
2525
import org.springframework.aot.hint.TypeReference;
26+
import org.springframework.batch.core.scope.context.JobContext;
27+
import org.springframework.batch.core.scope.context.StepContext;
2628
import org.springframework.core.DecoratingProxy;
2729

2830
/**
@@ -58,6 +60,9 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
5860
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class));
5961

6062
hints.reflection().registerType(Types.class, MemberCategory.DECLARED_FIELDS);
63+
64+
hints.reflection().registerType(JobContext.class, MemberCategory.INVOKE_PUBLIC_METHODS);
65+
hints.reflection().registerType(StepContext.class, MemberCategory.INVOKE_PUBLIC_METHODS);
6166
}
6267

6368
}

0 commit comments

Comments
 (0)