From a5f85968eb5201a5a6e3afe14dd10065a3726c37 Mon Sep 17 00:00:00 2001 From: abilan Date: Wed, 16 Nov 2022 16:30:19 -0500 Subject: [PATCH] Add Pausable & ManageableSmartLifecycle for AOT The `Pausable` & `ManageableSmartLifecycle` types are eligible to be used from Control Bus. This one is based on SpEL and therefore requires a reflection for those types to be available in native image --- .../springframework/integration/aot/CoreRuntimeHints.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/aot/CoreRuntimeHints.java b/spring-integration-core/src/main/java/org/springframework/integration/aot/CoreRuntimeHints.java index a26437e673..f42d16088b 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/aot/CoreRuntimeHints.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/aot/CoreRuntimeHints.java @@ -43,6 +43,7 @@ import org.springframework.integration.core.GenericHandler; import org.springframework.integration.core.GenericSelector; import org.springframework.integration.core.GenericTransformer; import org.springframework.integration.core.MessageSource; +import org.springframework.integration.core.Pausable; import org.springframework.integration.dsl.IntegrationFlow; import org.springframework.integration.gateway.MethodArgsHolder; import org.springframework.integration.gateway.RequestReplyExchanger; @@ -57,6 +58,7 @@ import org.springframework.integration.store.MessageHolder; import org.springframework.integration.store.MessageMetadata; import org.springframework.integration.support.MutableMessage; import org.springframework.integration.support.MutableMessageHeaders; +import org.springframework.integration.support.management.ManageableSmartLifecycle; import org.springframework.messaging.MessageHandler; import org.springframework.messaging.MessageHeaders; import org.springframework.messaging.PollableChannel; @@ -86,7 +88,9 @@ class CoreRuntimeHints implements RuntimeHintsRegistrar { IntegrationProperties.class, MethodArgsHolder.class, AbstractReplyProducingMessageHandler.RequestHandler.class, - ExpressionEvaluatingRoutingSlipRouteStrategy.RequestAndReply.class) + ExpressionEvaluatingRoutingSlipRouteStrategy.RequestAndReply.class, + Pausable.class, + ManageableSmartLifecycle.class) .forEach(type -> reflectionHints.registerType(type, MemberCategory.INVOKE_PUBLIC_METHODS)); reflectionHints.registerType(JsonPathUtils.class,