将 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);
}
任何对此的意见都将受到赞赏。
谢谢
检查您是否有多个@IntegrationComponentScan注释。 Spring Boot 3 不再支持此功能。您必须使用单个 @IntegrationComponentScan 注释加载所有 MessagingGateways。