繁体   English   中英

Spring Integration DSL Http入站网关

[英]Spring Integration DSL Http Inbound Gateway

我尝试使用以下代码,但得到响应:状态:405方法不允许。 这是我的Http请求: http:// localhost:8090 / services / test?name = test 代码或http请求有什么问题?

@Bean
      public IntegrationFlow httpInternalServiceFlow() {
        return IntegrationFlows
                .from(Http.inboundGateway("/services/test")
                        .requestMapping(r -> r.params("name")
                        .methods(HttpMethod.GET))
                        .payloadExpression("#requestParams.name"))
                .get();
    }

最终,我设法找到了问题的根源。 spring-boot-starter-amqp将servlet:'messageDispatcherServlet'映射到[/ services / *],由于我已经将Endpoing注册到/ services / test应用程序而导致冲突

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM