You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 postForEntityand/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
The text was updated successfully, but these errors were encountered:
TestRestTemplate
is relatively popular in the spring world but it's not obvious how to use it with the spring-data-restCrudRepository
generated endpoints. spring-data-rest wraps every response in an object I didn't create. It's not obvious how to useTestRestTemplate
with this object unless I return simple response classes likeString
orMap<?, ?>
.TestRestTemplate
can be used with spring-data-rest, please provide examples of using it with response bodies more complex thanString
orMap<?, ?>
. e.g., aPerson
class.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.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
The text was updated successfully, but these errors were encountered: