Spring Cloud Gateway не может обработать запрос Post с параметром, который имеет "==", как с этим бороться? - PullRequest
0 голосов
/ 19 января 2019

Я использую Spring Cloud Gateway в качестве API-шлюза в моем проекте Spring Cloud

Я обнаружил, что если после запроса используется параметр с "==", то ответ будет иметь следующее предупреждение:

 "error": "Internal Server Error",

    "message": "Invalid character '=' for QUERY_PARAM in \"%7B%22businessType%22:%22ftTranslate%22,%22command%22:%22sentence%22,%22data%22:%20%7B%22origin%22:%22zh%22,%22target%22:%22en%22,%22udid%22:%22%22%7D,%22tcl%22:%20%7B%22clientId%22:%221a5bf636-34ca-4aec-8bca-08d2a276ada1%22,%22subSysId%22:9,%22token%22:%22ua_73g+Qkl/nSMb7oPiqiwofOxrWnVp9zXWqMZ2FNT0Yam6Fv5zbQioS3I9+ws7WBPHGF/aVHHpMeC/g7L7BM/xWX/ghCZRLlzwmvDPA7SZnDUlbLOzGyxaXg==%22%7D,%22version%22:%221.0.0%22%7D\""

журнал сервера

��java.lang.IllegalArgumentException: недопустимый символ '=' для QUERY_PARAM в "% 7B% 22businessType"% 22:% 22ftTranslate% 22% 22command% 22:% 22sentence% 22% 22data% 22:% 20% 7B% 22origin% 22:% 22zh% 22% 22target% 22:% 22en% 22% 22udid%22:% 22% 22% 7D,% 22tcl% 22:% 20% 7B% 22clientId% 22:% 221a5bf636-34ca-4aec-8bca-08d2a276ada1% 22% 22subSysId% 22: 9,% 22token% 22:% 22ua_73g+ Qkl / nSMb7oPiqiwofOxrWnVp9zXWqMZ2FNT0Yam6Fv5zbQioS3I9 + ws7WBPHGF / aVHHpMeC / g7L7BM / xWX / ghCZRLlzwmvDPA7SZnDUlbLOzGyxaXg ==% 22% 22% 22source:% 22app% 22% 7D,% 22version% 22:% 221.0.0% 22% 7D»в org.springframework.web.util.HierarchicalUriComponents.verifyUriComponent (HierarchicalUriComponents.java:333) ~ [spring-web-5.0.7.RELEASE.jar: 5.0.7.RELEASE] в org.springframework.web.util.HierarchicalUriComponents.lambda $ verify $ 2 (HierarchicalUriComponents.java:301) ~ [spring-web-5.0.7.RELEASE.jar: 5.0.7.RELEASE] в java.util.Map.forEach (Map.java:630) ~ [na: 1.8.0_191] на org.springframework.web.util.HierarchicalUriComponents.verify (HierarchicalUriComponents.java:298) ~ [spri ng-web-5.0.7.RELEASE.jar: 5.0.7.RELEASE] на org.springframework.web.util.HierarchicalUriComponents. (HierarchicalUriComponents.java:100) ~ [spring-web-5.0.7.RELEASE.jar: 5.0.7.RELEASE] в org.springframework.web.util.UriComponentsBuilder.build (UriComponentsBuilder.java: 345) ~ [spring-web-5.0.7.RELEASE.jar: 5.0.7.RELEASE] по адресу org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter.filter (RouteToRequestUrlFilter.java:73) ~ [spring-cloud-gateway-core-2.0.0.RELEASE.jar: 2.0.0.RELEASE] at org.springframework.cloud.gateway.handler.FilteringWebHandler $ GatewayFilterAdapter.filter (FilteringWebHandler.java:133) ~ [spring-cloud-gateway-core-2.0.0.RELEASE.jar: 2.0.0.RELEASE] at org.springframework.cloud.gateway.filter.OrderedGatewayFilter.filter (OrderedGatewayFilter.java:44) ~ [spring-cloud-gateway-core-2.0.0.RELEASE.jar: 2.0.0.RELEASE] в org.springframework.cloud.gateway.handler.FilteringWebHandler $ DefaultGatewayFilterdaChain.la$ filter $ 0 (FilteringWebHandler.java:115) ~ [spring-cloud-gateway-core-2.0.0.RELEASE.jar: 2.0.0.RELEASE] в реакторе.core.publisher.MonoDefer.subscribe (MonoDefer.java:45) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE], по адресу реактор.кор.публикатор.MonoDefer.subscribe (MonoDefer.java:53) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] на реакторе.core.publisher.MonoDefer.subscribe (MonoDefer.java:53) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] на реакторе.core.publisher.Mono.subscribe (Mono.java:3080) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.MonoIgnoreThen $ ThenIgnoreMain.drain (MonoIgnoreThen.java:172) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.MonoIgnoreThen.subscribe (MonoIgnoreThen.java:56) ~ [реактор-ядро-3.1.8.RELEASE.банка: 3.1.8.RELEASE] в реакторе.core.publisher.MonoDefer.subscribe (MonoDefer.java:53) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.MonoDefer.subscribe (MonoDefer.java:53) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.Mono.subscribe (Mono.java:3080) ~ [реактор-core-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.MonoIgnoreThen $ ThenIgnoreMain.drain (MonoIgnoreThen.java:172) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.MonoIgnoreThen.subscribe (MonoIgnoreThen.java:56) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.MonoFlatMap$ FlatMapMain.onNext (MonoFlatMap.java:150) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.FluxSwitchIfEmpty $ SwitchIfEmptySubscriber.onNext (FluxSwitchjf)~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реактореr.core.publisher.MonoNext $ NextSubscriber.onNext (MonoNext.java:76) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.FluxConcatMap $ ConcatMapImmediate.innere(FluxConcatMap.java:271) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.FluxConcatMap $ ConcatMapInner.onNext (FluxConcatMap.java:803) ~ [реактор-core-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.FluxMap $ MapSubscriber.onNext (FluxMap.java:108) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] at реактор.core.publisher.FluxSwitchIfEmpty $ SwitchIfEmptySubscriber.onNext (FluxSwitchIfEmpty.java:67) ~ [реактор-core-core-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реактор.core.pore.Operators $ MonoSubscriber.complete (Operators.java:1083) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.MonoFlatMap $ FlatMapMain.onNext (MonoFlatMap.java:144) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.FluxMap $ MapSubscriber.onNext (FluxMap.java:108) ~ [реактор-сore-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.MonoNext $ NextSubscriber.onNext (MonoNext.java:76) ~ [реактор-основной-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.FluxFilterWhen $ FluxFilterWhenSubscriber.drain (FluxFilterWhen.java:262) ~ [processor-core-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher☎~ [реактор-сердцевина-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.DrainUtils.postCompleteDelayError (DrainUtils.java:357) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.FluxDematerialize $ DematerializeSubscriber.onComplete (FluxDematerialize.java:144) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.кор.publisher. FluxDematerialize.jar: 3.1.8.RELEASE] в реакторе.core.publisher.FluxDematerialize $ DematerializeSubscriber.onNext (FluxDematerialize.java:42) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.publisher.FluxFlattenIterable $ FlattenIterableSubscriber.drainAsync (FluxFlattenIterable.java:391) ~ [реактор-ядро-3.1.8.RELEASE.jar: 3.1.8.RELEASE] в реакторе.core.pu

какбороться с этим?спасибо

...