简体   繁体   中英

Query a Spring Data Rest repository with a HATEOAS link?

If a client sends my API a HATEOAS link in an object to reference some entity like:

{
      "someLink": "http://localhost:8080/someResource/1"
}

Can I query the someResource repository using this link?

Don't see why you wouldn't be able to.

You could hit the repository with a server side HTTP client after pulling the link in the controller and return the output or deserialize the link and hit the repository yourself if the controller can acquire reference to it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM