Configure Jackson for Glassfish 4.1

Needed to configure Jackson for Glassfish 4.1 and was getting errors due to another library (MOXY) being used.

Here is how to disable it. First, we implement the

javax.ws.rs.core.Feature

interface like so:

Next, we configure our web service with a

org.glassfish.jersey.server.ResourceConfig

object, like so:

There is also a

package(‘net.my.package’)

to register a bunch of services.

Also, here is the test code for the JacksonFeature class:

Leave a Reply

Your email address will not be published. Required fields are marked *