Skip to content

Commit 4c5b88c

Browse files
committed
Added hint for TaskExecution for stream processing
The streamBridge is not included in Spring Cloud Stream AOT processing, and thus when Jackson parsing uses reflection it can't find TaskExecution So TaskExecution needed to be added for task-events
1 parent 61f6926 commit 4c5b88c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-cloud-task-core/src/main/java/org/springframework/cloud/task/configuration/TaskRuntimeHints.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
4747
TypeReference.of("org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer"),
4848
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
4949
MemberCategory.INVOKE_DECLARED_METHODS));
50+
hints.reflection().registerType(TypeReference.of("org.springframework.cloud.task.repository.TaskExecution"),
51+
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
52+
MemberCategory.INVOKE_DECLARED_METHODS));
5053

5154
if (!ClassUtils.isPresent("com.zaxxer.hikari.HikariDataSource", classLoader)) {
5255
return;

0 commit comments

Comments
 (0)