CXF: No message body writer found for class - automatically mapping non-simple resources

前端 未结 10 670
野的像风
野的像风 2020-12-08 03:59

I am using the CXF rest client which works well for simple data types (eg: Strings, ints). However, when I attempt to use custom Objects I get this:

Exceptio         


        
10条回答
  •  盖世英雄少女心
    2020-12-08 04:49

    You can also configure CXFNonSpringJAXRSServlet (assuming JSONProvider is used):

    
      jaxrs.providers
      
          org.apache.cxf.jaxrs.provider.JSONProvider
          (writeXsiType=false)
       
    
    

提交回复
热议问题