[英]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.