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
This commit is contained in:
Glenn Renfro
2022-10-12 13:20:45 -04:00
parent 61f69265a1
commit 4c5b88c338

View File

@@ -47,6 +47,9 @@ public class TaskRuntimeHints implements RuntimeHintsRegistrar {
TypeReference.of("org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer"),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
MemberCategory.INVOKE_DECLARED_METHODS));
hints.reflection().registerType(TypeReference.of("org.springframework.cloud.task.repository.TaskExecution"),
hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
MemberCategory.INVOKE_DECLARED_METHODS));
if (!ClassUtils.isPresent("com.zaxxer.hikari.HikariDataSource", classLoader)) {
return;