2
votes

I tried to use the following code and I got as a response: Status: 405 Method Not Allowed. Here is my Http request: http://localhost:8090/services/test?name=test. What's wrong with the code or http request?

@Bean
      public IntegrationFlow httpInternalServiceFlow() {
        return IntegrationFlows
                .from(Http.inboundGateway("/services/test")
                        .requestMapping(r -> r.params("name")
                        .methods(HttpMethod.GET))
                        .payloadExpression("#requestParams.name"))
                .get();
    }
1
Please, turn on DEBUG logic level for the org.springframework category to see what's going on with your request on the server. You might have some Servlet Filter up front of that HTTP Inbound Gateway. On the other hand it isn't clear if you have @EnableIntegration or not...Artem Bilan
Received a request to uri [/services/test] that should not be sampled [false] No parent span present - creating a new span Successfully completed request Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@4f7f63c4Stefanos
Retrieving delivery for Consumer@3bb8d847: , channel=Cached Rabbit Channel: AMQChannel, conn: Proxy@5a9d5e2 Shared Rabbit Connection: SimpleConnection@32a4284d , acknowledgeMode=AUTO local queue size=0 The request with uri [/services/test] hasn't been handled by any of Sleuth's components. That means that most likely you're using custom HandlerMappings and didn't add Sleuth's TraceHandlerInterceptor. Sleuth will create a span to ensure that the graph of calls remains valid in Zipkin Detaching the span Trace since the response was unsuccessfulStefanos
??? How that Sleuth concern is related to your question? Maybe you can share simple Boot application to play from our side?Artem Bilan

1 Answers

0
votes

Finally I managed to come to the root of the problem. spring-boot-starter-amqp maps servlet: 'messageDispatcherServlet' to [/services/*] and due to the fact that I have registered my endpoing to /services/test application came to a conflict