ARTICLE AD BOX
I am attempting to upgrade from Spring Boot 3.5 to 4.0, which includes an upgrade to spring integration 7, but am having trouble autowiring my nullChannel.
In the previous version I have often autowired an NullChannel via dependency injection and then used it in my IntegrationFlow.
@Component @RequiredArgsConstructor public class PipelineFlow { private final NullChannel nullChannel; @Bean public IntegrationFlow MyFlow() { return IntegrationFlow .from(myChannel) // filter, handle, etc. .route(MyMessage.class, MyMessage::getType, mapping -> mapping // channel mappings .defaultOutputChannel(nullChannel) ) } }But when attempting to start my spring application or running the tests, I am getting the exception:
Unsatisfied dependency expressed through constructor parameter 10: No qualifying bean of type 'org.springframework.messaging.MessageChannel' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier("nullChannel")}
My Question: Is no bean of type NullChannel automatically supplied anymore? Or should I qualify the channel by name instead, e.g. .channel("nullChannel")
