Answer the question
In order to leave comments, you need to log in
How to use Spring HATEOAS (data rest) client side?
public class Filial {
private long id;
private String name;
}
public class User {
private long id;
private String name;
@JoinColumn(...)
private Filial filial;
}
{
"id": 1,
"name": "Test T.T.",
"filial": ""http://localhost/filial/2"
}
Answer the question
In order to leave comments, you need to log in
Let's say you have a link to the user:
Then the link to the association with the branch will be:
And two links to the branches:
http://localhost:8080/filial/1
http://localhost:8080/filial/2
curl -X PUT -H "Content-type: text/uri-list" http://localhost:8080/user/1/filial -d http://localhost:8080/filial/2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question