05 Feign
05 Feign
05 Feign
In this lab, you will be working on projects under working set 07-feign
We just want to write the interfaces and want the implementation which makes rest calls to be
generated automatically.
Also in Feign client we gave the name registered in Eureka. So, Feign will automatically lookup for
the service in Eureka and internally uses Ribbon also for doing load balancing.
After Enabling Feign Clients, proxies will be generated implemeting the interfaces
Like in earlier lab exercise, make a cargo booking and make a note of bookingId in response.
{
"bookingAmount": 100,
"originLocation": "BLR",
"destLocation" : "DEL",
"destArrivalDeadline" : "2020-01-28"
}
Now make a request to route cargo from swagger ui using the bookingId
Now make a request to route cargo from swagger ui using the bookingId
You should get 503 status code and error message as shown below:
. So, hystrix fallbacks are executed when the rest calls fail