How to put and post links with Spring HATEOAS How to put and post links with Spring HATEOAS spring spring

How to put and post links with Spring HATEOAS


Look at the answer here:

POSTing a @OneToMany sub-resource association in Spring Data REST

Question 1) Yes this is how you post links/relations. With URIs.

Question 2) The URI of the resource actually IS its ID from the client's perspective. The server internally automatically resolves this URI into the actual model instance with

org.springframework.data.rest.core.UriToEntityConverter.convert(...)