Skip to content
No description, website, or topics provided.
Java
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
pom.xml

README.md

Jongo + Jersey

Because Jongo uses Jackson by default, exposing the same objects with Jersey won't work if they have an ObjectId. This full working sample shows how to make Jersey expose ObjectId as String (and annoted String with @ObjectId too).

It also shows how to use Jackson 2.x with Jersey (so only one Jackson is in the classpath).

In a nutshell:

  • a custom provider to expose ObjectId as String and handle @ObjectId
  • a dependency to com.sun.jersey:jersey-json replaced by com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider (which have the following impacts: POJO_MAPPING_FEATURE is no longuer needed and every packages has to be move from Jackson 1.x to 2.x)
You can’t perform that action at this time.