問題タブ [openfeign]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - @RequestBody を追加して POST リクエストで Pageable を Feign Client に渡す方法
Spring で REST サービス コントローラー用の偽のクライアントを作成しようとしました。
クライアントは次のようになります。
テストを実行すると、次の例外がスローされます。
原因: java.lang.IllegalStateException: メソッドの Body パラメータが多すぎます: public abstract org.springframework.data.domain.Page com.foo.bar.jobservice.client.MeasureServiceClient.searchMeasures(java.lang.String,com.example .foo.jobservice.client.dto.MeasureDto,org.springframework.data.domain.Pageable)
私がすでに知っている/試したこと:
github には解決済みの問題があります: https://github.com/spring-cloud/spring-cloud-netflix/issues/556
問題を解決するはずだったコミットの問題:
https://github.com/spring-cloud/spring-cloud-openfeign/issues/26
コミット:
私が設定したもの:
まだ動作していません。
私が使用しているもの:
私は何を間違っていますか?
アップデート:
再現可能な例を作成しました:
https://github.com/manuelwaltschek/mre.git
クライアント サービスを起動するか、spring/spring-cloud-openfeign/375-pageable-not-working/parent/client/src/test/java/com/example/client/HelloServiceClientTest.java を呼び出します。
github で問題を開く: https://github.com/spring-cloud/spring-cloud-openfeign/issues/375 https://github.com/spring-cloud/spring-cloud-openfeign/issues/385
編集:基本的に、ページング可能なものを偽のクライアントに渡す方法を知りたいです。多分それをURLパラメータでエンコードしますか?
spring - Spring Cloud Open Feign: gzip 応答本文から削除された改行 "\n"
Spring Cloud Open Feign で応答圧縮構成 (以下のように) を使用すると、gzip応答本文から改行 (「\n」または「\r」) が取り除かれます。エラーは発生しません。改行は空の文字列 "" に置き換えられています。応答には、正しい「content-encoding: gzip」ヘッダーと、整形式の gzip された本文コンテンツが含まれています。
誰かが手がかりを持っていますか?ここでspring-cloud-openfeign/issue400を開いたので、私にとっては問題のようです
SpringCloudFeignClient.java
ApplicationTest.java:
ブートストラップ.yml:
バージョン:
完全なプロジェクトはこちら: https://github.com/spring-cloud/spring-cloud-openfeign/files/5147346/spring-cloud-feign-gzip.zip