Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Document how to use TestRestTemplate with spring-data-rest

オープン
#2,365 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 24 日以内に返信

@odrotbohm がすでに取り組んでいます。

2024年2月20日 から。

評価

この issue はまだ評価されていません。

説明

status: waiting-for-triage

TestRestTemplate is relatively popular in the spring world but it's not obvious how to use it with the spring-data-rest CrudRepository generated endpoints. spring-data-rest wraps every response in an object I didn't create. It's not obvious how to use TestRestTemplate with this object unless I return simple response classes like String or Map<?, ?>.

    • If TestRestTemplate can be used with spring-data-rest, please provide examples of using it with response bodies more complex than String or Map<?, ?>. e.g., a Person class.
    • Please also include a postForEntity and/or putForEntity(putForEntity doesn't exist) example, because I see a lot of people struggling to make requests that send a complex class, e.g., Person, in the request body.
    • If TestRestTemplate is the wrong tool for the job, please recommend the right tool or a better tool. This might already be documented, but I've been unable to find it.

Thanks,
Dan

主要言語
Java
スター
957
フォーク
568
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

spring-projects/spring-data-rest のほかの issue

spring-projects/spring-data-rest の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。