We can also inherit interfaces to avoid boilerplate code for the same type of services. Feign allows grouping common operations into convenient base interfaces. Let's see the following example:
@FeignClient(name="account-service") public interface AccountService { @GetMapping(value = "/account/customer/{customer}") List<Account> findByCutomer (@PathVariable("customer") Integer
customer); ... }
We can inherit this interface in the creation of another FeignClient service:
@FeignClient("users") public interface AdminAccountService extends AccountService { ... }