While it is possible to set the default behavior for all service methods by specifing @Consumes and @Produces on the interface itself (which is working just fine with the publisher), the ConsumerFactory seems to only look for those annotations on the method itself.
This interface works fine on the publisher, but not with the consumer (it tries to lookup a provider for plain/text)
@Path("/test")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public interface TestService {
@PUT
@Path("/doIt")
Model doIt(Model model);
}
While it is possible to set the default behavior for all service methods by specifing
@Consumes
and@Produces
on the interface itself (which is working just fine with the publisher), theConsumerFactory
seems to only look for those annotations on the method itself.This interface works fine on the publisher, but not with the consumer (it tries to lookup a provider for
plain/text
)while this version also works with the consumer
edit: observed in version 5.3.1