Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modify Enunciate generated configuration file to use the latest jackson library for CXF

Enunciate generates the cxf-jaxrs-servlet.xml file automatically and specifies: org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider as the JAX-RS provider. This class has changed to com.fasterxml.jackson.jaxrs.JacksonJaxbJsonProvider in the latest Jackson library. How can I make Enunciate specify the new class as the JSON provider in the automatically generated file? Or can I make Enunciate to use a user provided XML file?

like image 690
xesxz Avatar asked Nov 03 '22 16:11

xesxz


1 Answers

I had a similar issue and am using Maven with Spring. I was able to solve this by using the maven replacer plugin and setting it to overwrite the org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider in jaxrs:providers and replacing it with com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider.

like image 191
Richard Avatar answered Nov 09 '22 14:11

Richard