Skip to content

Commit a5f8596

Browse files
committed
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
1 parent 508fb16 commit a5f8596

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

+5-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import org.springframework.integration.core.GenericSelector;
4444
import org.springframework.integration.core.GenericTransformer;
4545
import org.springframework.integration.core.MessageSource;
46+
import org.springframework.integration.core.Pausable;
4647
import org.springframework.integration.dsl.IntegrationFlow;
4748
import org.springframework.integration.gateway.MethodArgsHolder;
4849
import org.springframework.integration.gateway.RequestReplyExchanger;
@@ -57,6 +58,7 @@
5758
import org.springframework.integration.store.MessageMetadata;
5859
import org.springframework.integration.support.MutableMessage;
5960
import org.springframework.integration.support.MutableMessageHeaders;
61+
import org.springframework.integration.support.management.ManageableSmartLifecycle;
6062
import org.springframework.messaging.MessageHandler;
6163
import org.springframework.messaging.MessageHeaders;
6264
import org.springframework.messaging.PollableChannel;
@@ -86,7 +88,9 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
8688
IntegrationProperties.class,
8789
MethodArgsHolder.class,
8890
AbstractReplyProducingMessageHandler.RequestHandler.class,
89-
ExpressionEvaluatingRoutingSlipRouteStrategy.RequestAndReply.class)
91+
ExpressionEvaluatingRoutingSlipRouteStrategy.RequestAndReply.class,
92+
Pausable.class,
93+
ManageableSmartLifecycle.class)
9094
.forEach(type -> reflectionHints.registerType(type, MemberCategory.INVOKE_PUBLIC_METHODS));
9195

9296
reflectionHints.registerType(JsonPathUtils.class,

0 commit comments

Comments
 (0)