JAXRS client can't find message body writer

后端 未结 3 1442
旧时难觅i
旧时难觅i 2020-12-06 21:29

I have a jaxrs client configured like this:



        
3条回答
  •  无人及你
    2020-12-06 22:08

    This answers point me in the right direction, yet i had to add on two parts to make it work on web.xml

     
            jaxrs.providers
            
                org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider
                (writeXsiType=false)
            
        
    

    And on the client call:

    List providers = new ArrayList<>();
        // add custom providers if any
        providers.add(new JacksonJaxbJsonProvider());
        WebClient client = WebClient.create(ENDPOINT_ADDRESS,providers);
    
        

    提交回复
    热议问题