Grokking Spring Boot
0% completed
Calling Other Services
Every call from the booking service to the payment provider needs the same four pieces.
- An address, such as https://payments.example.com/charges, that differs between a laptop and production.
- A request body written as JSON from a Java object.
- A conversion of the JSON answer back into a Java object.
- A plan for errors, because the provider can decline a card, be busy, or not answer at all.
Writing these by hand for each call repeats the same setup code many times. Spring offers two ways to declare them instead
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%