Spring REST Flashcards
Spring HATEOS
a libraby of APIs used to decouple the client and the server to a large extene and let them evolve indepently (consumer/provider? )
you can use to create links that point to Spring MVC controllers, build up resource representations, and control how they are rendered into supported hypermedia formats (such as HAL).
The service will accept HTTP GET requests at http://localhost:8080/greeting.
It will respond with a JSON representation of a greeting that is enriched with the simplest possible hypermedia element, a link that points to the resource itself. The following listing shows the output:
{
“content”:”Hello, World!”,
“_links”:{
“self”:{
“href”:”http://localhost:8080/greeting?name=World”
}
}
}
(https://spring.io/guides/gs/rest-hateoas/#initial)
Web clients/consumers
2 options in Spring data:
1.RestTemplate
2.WebClient