Springboot 3.1 和 Spring Integration 6 - IntegrationComponentScan 未扫描 MessagingGateway

问题描述 投票:0回答:1

将 springboot 从 2.7 升级到 3.1,并且依赖的 spring jar 升级到版本 6。升级后,spring 集成流程无法处理请求。 抛出错误 - org.springframework.beans.factory.NoSuchBeanDefinitionException:没有类型为“com.flows.RaiseFlow$RaiseGateway”的合格 bean 可用

我的 MessagingGateway 注释如下所示,位于“RaiseFlow”类中。我尝试在此类上添加 @Confiration 和 @IntegrationComponentScan 注释

@MessagingGateway(errorChannel = "errorChannel")
    public interface RaiseGateway {
        @Gateway(requestChannel = "raiseInputChannel")
        Object raise(Message message);
    }

任何对此的意见都将受到赞赏。

谢谢

spring-integration
1个回答
0
投票

检查您是否有多个@IntegrationComponentScan注释。 Spring Boot 3 不再支持此功能。您必须使用单个 @IntegrationComponentScan 注释加载所有 MessagingGateways。

© www.soinside.com 2019 - 2024. All rights reserved.