-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
-
Undefined
In WildFly if a user wants to use Jackson for JSON binding they need to set the resteasy-prefer-jackson-over-jsonb to true. The documentation states:
https://docs.jboss.org/resteasy/docs/3.15.1.Final/userguide/html/Installation_Configuration.html#resteasy_modules_in_wildfly
In WildFly, RESTEasy and the JAX-RS API are automatically loaded into your deployment's classpath if and only if you are deploying a JAX-RS application (as determined by the presence of JAX-RS annotations). However, only some RESTEasy features are automatically loaded. See Table 3.1. If you need any of those libraries which are not loaded automatically, you'll have to bring them in with a jboss-deployment-structure.xml file in the WEB-INF directory of your WAR file. Here's an example:
<jboss-deployment-structure> <deployment> <dependencies> <module name="org.jboss.resteasy.resteasy-jackson-provider" services="import"/> </dependencies> </deployment> </jboss-deployment-structure>
Either the documentation needs to be updated to include you also need to change or just need to change the resteasy-prefer-jackson-over-jsonb property or attribute. Or we need to ensure that WildFly will load the Jackson Provider if it's added to the deployment explicitly. The easiest option seems to be to update the documentation.
The CLI command would be:
/subsystem=jaxrs:write-attribute(name=resteasy-prefer-jackson-over-jsonb, value=true)