Closed
Description
When I upgrade spring cloud to 2024.0.0 i get NullPointerException in FunctionContextUtils:120. I figured out that it happen when I create IntegrationFlow bean with input from function and bean create method has parameters.
For example:
@Bean
public IntegrationFlow addressFlow(AddressDetailsHandler addressDetailsHandler) {
return IntegrationFlow.from(AddAddressConsumer.class, gateway -> gateway.beanName(ADD_ADDRESS_BINDER))
.handle(addressDetailsHandler)
.get();
}
produced NPE but when I changed to
@Bean
public IntegrationFlow addAddressChannelFlow() {
return IntegrationFlow.from(AddAddressConsumer.class, gateway -> gateway.beanName(ADD_ADDRESS_BINDER))
.channel(ADD_ADDRESS_CHANNEL)
.get();
}
@Bean
public IntegrationFlow addressFlow(AddressDetailsHandler addressDetailsHandler) {
return IntegrationFlow.from(ADD_ADDRESS_CHANNEL)
.handle(addressDetailsHandler)
.get();
}
it works. Previously I used spring cloud 2023.0.3 and everything was fine.