In order to save a Spring Data Rest object with a foreign key to another object I can use a following JSON
{
"studentName":"newObj",
"department":"departments/2"
}
where department is a HAL link.
I wish to do some processing before the student is saved, without changing the default Spring Data Rest API.
How can I define a Spring controller endpoint so that it parses the resource link automatically and initializes the student object with the according department object?