@SpringQueryMap does not work with records under certain conditions
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- java, mongodb, spring, spring-boot
調査の方向性
提供されたダミーアプリケーションから始め、spring-boot-starter-data-mongodb が存在する状態で record を使ったリクエストを再現し、その後、クラスベースの場合および依存関係なしの場合と比較します。Feign client が使用する @SpringQueryMap の処理を追跡し、欠落しているクエリ文字列の回帰テストを追加します。MongoDB starter が有効な状態で、record のリクエストが /test?foo=foo を送信すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
We ran into an issue where @SpringQueryMap was not working in one of our apps. I created a dummy app to try and diagnose the issue, but it wasn't until I stumbled across this bug that I identified the problem. Unlike the other bug, it was spring-boot-starter-data-mongodb in our case. Below is some sample code. Without spring-boot-starter-data-mongodb, it works fine. Add spring-boot-starter-data-mongodb and the querystring no longer gets sent.
@FeignClient(name = "scratch-service", url = "http://localhost:8091")
public interface ScratchClient
{
@Builder
record Test(String foo)
{
}
@GetMapping("/test")
void test(@SpringQueryMap final Test test);
}
@RequiredArgsConstructor
@Slf4j
@RestController
public class ScratchController
{
private final ScratchClient scratchClient;
@GetMapping("/test")
public void test(final ScratchClient.Test test)
{
log.info("test: {}", test);
}
@GetMapping("/feign")
public void feign()
{
scratchClient.test(ScratchClient.Test.builder().foo("foo").build());
}
}
with spring-starter-data-mongodb...
http-outgoing-0 >> GET /test HTTP/1.1
without...
http-outgoing-0 >> GET /test?foo=foo HTTP/1.1
This was tested with Spring Boot 3.4.5 and Spring Cloud 2024.0.1
Switching it from a record to a class does not have this compatibility issue.
- 主要言語
- Java
- スター
- 1.3k
- フォーク
- 834
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 14
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
spring-cloud/spring-cloud-openfeign のほかの issue
-
@RequestHeader overrides @PathVariable with the same name再び着手できるかも @rajeshvasa が 11 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンwaiting-for-triage
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
spring-cloud/spring-cloud-openfeign#1465 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
spring-cloud/spring-cloud-openfeign#1392 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
FeignClientsConfiguration$MicrometerConfiguration.class cannot be opened because it does not existオープンfeedback-provided
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
spring-cloud/spring-cloud-openfeign#1379 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
waiting-for-triage
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
spring-cloud/spring-cloud-openfeign#1340 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
dependencies
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
spring-cloud/spring-cloud-openfeign#1334 · コメント 11 件 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
spring-cloud/spring-cloud-openfeign の issue をすべて見る
似ている issue
-
Add contributing guide対応中かも @WadekarPrashant が今日担当しました。 オープンgood first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
jenkinsci/gitea-checks-plugin#382 · コメント 1 件 ·
-
enhancement infra
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
5.0.x backport bug
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
spring-cloud/spring-cloud-function#1569 ·
メンテナーはふだん 1 日以内に返信
-
Move the spring-cloud-commons version and BOM import from the bus parent to the stream parent対応中かも @olegz が今日担当しました。 オープンtask
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
spring-cloud/spring-cloud-stream#3355 ·
メンテナーはふだん 1 日以内に返信
-
bug untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
opensearch-project/opensearch-java#2342 ·
メンテナーはふだん 1 日以内に返信