将GatewayConfiguration.java中的path改为.path(“/demo 1 Service”),将uri改为.uri(“http://localhost:8090”)。现在当我点击url htt://localhost:8080/demo 1 Service时,它成功路由到http://localhost:8090/demo 1 Service。
InputStream responseInputStream = MvcUtils.getAttribute(request, MvcUtils.CLIENT_RESPONSE_INPUT_STREAM_ATTR); StreamUtils.copy(responseInputStream, OutputStream.nullOutputStream()); Sample Here is a repo that reproduces the issue:https://github.com/johan1a/spring-cloud-gateway-mvc-connection-test/tre...
[spring-cloud-gateway-server-mvc-4.1.0-RC1.jar:4.1.0-RC1] at org.springframework.web.servlet.function.HandlerFilterFunction.lambda$ofRequestProcessor$3(HandlerFilterFunction.java:83) ~[spring-webmvc-6.1.1.jar:6.1.1] at org.springframework.web.servlet.function.HandlerFilterFunction.lambda$and...
Currently, prefix is spring.cloud.gateway.mvc, the new convention is spring.cloud.gateway.server.webmvc See #3363
Hi, I have the similar requirements with mrinmoykhamrui, modifying response body in spring cloud gateway mvc. But I couldn't find the filter to modify response body in mvc and other way to modify ServerResponse body. According toMVC Gateway Server PR, providing ModifyResponseBody filter is in...