Search code examples
javajsonspringrestspring-data-rest

Java client to Spring Data Rest server


I want to create a RESTful server which provides persistency for 2 types of clients: (1) a webpage, so JSON transport is the obvious choice, and (2) a Java stand-alone client. The Java server and Java client should both share the same domain model.

I'm working on getting the server running with Spring Data Rest and JPA. Spring Data Rest looks like a very elegant solution.

However, most of the uses of Spring Data Rest is with a html client or RestTemplates but i have not found any examples of how to de-serialise the JSON back into the same domain objects it originates from.

If there is a better suggestion than Spring Data Rest i would also like to hear.


Solution

  • i found a nice example of a Spring Data Repository which uses REST as an implementation for the Repository.

    see https://github.com/onlyabout/spring-data-rest-client

    this allows for using Spring Data in your client application.