When @RegisterProvider is paired with @RegisterRestClient the class is
automatically registered as a provider. When @RegisterProvider is
used alone on an interface as you have the class must be registered
via RestClientBuilder.newBuilder().register(YOUR_PROVIDER.class) or
placed in a services file.
I suggest posting this question to the Microprofile-rest-client discussion
forum,
https://accounts.eclipse.org/mailing-list/microprofile-dev
On Sat, Oct 31, 2020 at 6:20 AM Milan Konzal <milan(a)konzal.net> wrote:
I would like to register different Providers on different
sub-resources
but when I try it, it is not working (I get an exception regarding missing
provider when the method on the sub-resource was called).
Is it expected? I can't find any information in the MP specification nor
Resteasy documentation.
My resource proxy
@Path("/foo")
@RegisterProvider(XYZWriter.class)
@RegisterProvider(XYZReader.class)
public interface Foo {
@POST
@Consumes("xyz")
@Produces("xyz")
FooResponse get(FooContent content);
@Path("/bar")
Bar getBar();
}
My sub resource proxy
@RegisterProvider(ABCReader.class)
public interface Bar {
@POST
@Produces("abc")
BarResponse get();
}
My call
foo.getBar().get();
Only registrations on the resource proxy are done.
I'm using Resteasy 4.5.8 implementation of MP rest client.
_______________________________________________
resteasy mailing list -- resteasy(a)lists.jboss.org
To unsubscribe send an email to resteasy-leave(a)lists.jboss.org