Can you set Jackon's Include.NON_NULL globally in JAX-RS?
<p>I have a JAX-RS API using Apache CXF. Recently I switched from Jettison to Jackson (2.7.1) for JSON handling. I am using JacksonJaxbJsonProvider.</p>

<p>One thing I need to do to help with transition is to ensure that null fields in JSON are not being rendered. For that I am using following annotation on class level:</p>

<pre><code>@JsonInclude(JsonInclude.Include.NON_NULL)
public class Book {
 ...
}
</code></pre>

<p>Is there any way to set it globally, so that I do not have to apply this annotation to every class?</p>

<p>With Jettison I was able to specify properties in beans.xml file, is there a similar approach possible with Jackson to achieve NON_NULL behavior?</p>

<pre><code>  &lt;bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.json.JSONProvider"&gt;
    &lt;property name="dropRootElement" value="true"/&gt;
    &lt;property name="supportUnwrapped" value="true"/&gt;
  &lt;/bean&gt;
</code></pre>

<p>I have seen some suggestion to set up this property on ObjectMapper level when instantiated, however when using Apache CXF I never create ObjectMapper by hand, as this instantiation is handled by the framework (probably happens somewhere in JacksonJaxbJsonProvider).</p>

<p>Is there any way to set NON_NULL property globally?</p>