Description
When invoking a default method on an interface used as a MicroProfile Rest Client interface (and presumably the JAX-RS proxy-based client), I see the following exception:
javax.ws.rs.ProcessingException: Method org.apache.cxf.microprofile.client.mock.MyClient.myDefaultMethod is not a valid resource method
{{ at org.apache.cxf.microprofile.client.CxfTypeSafeClientBuilderTest.testCanInvokeDefaultInterfaceMethods(CxfTypeSafeClientBuilderTest.java:172)}}
Invoking default interface methods from a dynamic proxy's InvocationHandler is outlined in this article:
This type of operation becomes critical when combining the MicroProfile Rest Client with MP Fault Tolerance annotations like this:
public interface MyClient {
@GET
@Fallback(fallbackMethod="useFallback")
String tryActualRemoteRequest();
}}{{ default String useFallback() {
return "useful default value";
{{ }}}
}
Attachments
Issue Links
- links to