How to make Resteasy 2.3.6 use Jackson 2.+

删除回忆录丶 提交于 2019-12-05 23:23:57

It occured to be quite simple. There are Jackson JAXRS providers in Jackson 2 already.

  • jackson-jaxrs-xml-provider
  • jackson-jaxrs-json-provider
  • jackson-jaxrs-smile-provider

So on the pom.xml

<dependency>
    <groupId>com.fasterxml.jackson.jaxrs</groupId>
    <artifactId>jackson-jaxrs-json-provider</artifactId>
    <version>2.2.2</version>
</dependency>

It's also good to exclude resteasy-jettison-provider to make sure you have no conflicts fo JSON handling.

Unfortunately, it isn't possible to use Jackson 2.x with RESTEasy 2.x because the integration of Jackson 1.x is fairly tight.

However, RESTEasy supports Jackson 2.x as of version 3.0-beta-5 - please see this issue for details or do a repository search if you're using Maven.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!