Skip to content

Commit a06f39b

Browse files
neoludofmbenhassine
authored andcommitted
Add AOT runtime hints for core listeners
Signed-off-by: Ludovic Bertin <ludovic.bertin@gmail.com>
1 parent f1ac0c0 commit a06f39b

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

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

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022-2023 the original author or authors.
2+
* Copyright 2022-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -98,6 +98,27 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
9898

9999
// proxy hints
100100
hints.proxies()
101+
.registerJdkProxy(builder -> builder
102+
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.StepExecutionListener"))
103+
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
104+
.registerJdkProxy(builder -> builder
105+
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.ItemReadListener"))
106+
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
107+
.registerJdkProxy(builder -> builder
108+
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.ItemProcessListener"))
109+
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
110+
.registerJdkProxy(builder -> builder
111+
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.ItemWriteListener"))
112+
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
113+
.registerJdkProxy(builder -> builder
114+
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.ChunkListener"))
115+
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
116+
.registerJdkProxy(builder -> builder
117+
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.SkipListener"))
118+
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
119+
.registerJdkProxy(builder -> builder
120+
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.JobExecutionListener"))
121+
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))
101122
.registerJdkProxy(builder -> builder
102123
.proxiedInterfaces(TypeReference.of("org.springframework.batch.core.repository.JobRepository"))
103124
.proxiedInterfaces(SpringProxy.class, Advised.class, DecoratingProxy.class))

0 commit comments

Comments
 (0)