'Java Rest Client Auto Switch Rest endpoint

My App (Java Spring boot) consume REST APIs.

  • suppose the real endpoint is http://real/endpoint and

  • the mock one is http://mock/endpoint

Is there a way/lib to auto switch to mock when real api failed to response ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source