When servicing objects, we use the toResource method to convert them to resources and on the way back (placing a resource view from the client to the server), how can I convert the view back to a domain object?
I want to build the Book class (@Entity) from the BookResource class (extends the ResourceSupport class).
@RequestMapping(path="/", method = RequestMethod.POST, produces="application/vnd.company.app.book-v1+hal+json")
public ResponseEntity<?> addBook(@RequestBody BookResource bookResource) {
}
source
share