Wrap PollableBean in try/catch to accomodate AOT

This commit is contained in:
Oleg Zhurakousky
2022-07-25 09:57:29 +02:00
parent 88e5f88270
commit b9e30adf2f

View File

@@ -232,9 +232,13 @@ public class FunctionConfiguration {
if (!functionProperties.isComposeFrom() && !functionProperties.isComposeTo()) {
String integrationFlowName = proxyFactory.getFunctionDefinition() + "_integrationflow";
// Add back once https://github.com/spring-projects/spring-framework/issues/28748 is fixed
// PollableBean pollable = extractPollableAnnotation(functionProperties, context, proxyFactory);
PollableBean pollable = null;
try {
pollable = extractPollableAnnotation(functionProperties, context, proxyFactory);
}
catch (Exception e) {
// Will fix itself once https://github.com/spring-projects/spring-framework/issues/28748 is fixed
}
if (functionWrapper != null) {
IntegrationFlow integrationFlow = integrationFlowFromProvidedSupplier(new PartitionAwareFunctionWrapper(functionWrapper, context, producerProperties),