Unable to find a MessageBodyReader of content-type application/json and type class java.lang.String

前端 未结 8 660
野的像风
野的像风 2020-12-01 18:20

I am using RestEasy client with jackson providers and getting the above error

clientside code is:

ClientRequest request = new ClientRequest(url);
re         


        
相关标签:
8条回答
  • 2020-12-01 18:48
    Client client = ClientBuilder.newBuilder().register(ResteasyJacksonProvider.class).build();
    
    0 讨论(0)
  • 2020-12-01 18:50

    If you really want to by-pass goodness of JAX-RS actually doing serialization for you (instead of manually calling GSON), use StreamingOutput (i.e. wrap outputter as StreamingOutput, return that object).

    0 讨论(0)
提交回复
热议问题