Consider the example:
public interface BaseAPI {
@RequestLine("GET /health")
String health();
@RequestLine("GET /all")
List<Entity> all();
}
And then some specific API:
public interface CustomAPI extends BaseAPI {
@RequestLine("GET /custom")
String custom();
}
I'd like to use CustomAPI when creating Feign client and be able to access methods of the BaseAPI.
Currently only methods defined directly in the CustomAPI are bound to handlers.
It looks like the only required changes to be made are:
1 feign.Contract.BaseContract.parseAndValidatateMetadata(Class<?> declaring):
// for (Method method : declaring.getDeclaredMethods()) {
for (Method method : declaring.getMethods()) {
2 feign.ReflectiveFeign.newInstance(Target<T> target):
// for (Method method : target.type().getDeclaredMethods()) {
for (Method method : target.type().getMethods()) {
I was able to get the required functionality with the above changes.
Would be great to have this functionality either out of the box or easily configurable.
Consider the example:
And then some specific API:
I'd like to use
CustomAPIwhen creating Feign client and be able to access methods of theBaseAPI.Currently only methods defined directly in the
CustomAPIare bound to handlers.It looks like the only required changes to be made are:
1
feign.Contract.BaseContract.parseAndValidatateMetadata(Class<?> declaring):2
feign.ReflectiveFeign.newInstance(Target<T> target):I was able to get the required functionality with the above changes.
Would be great to have this functionality either out of the box or easily configurable.