Open TryKote opened 5 years ago
We didn't necessarily wanted to the change the defaults provided by Jersey it self, as it become more opinionated. Maybe some people like GSON better than Jackson. As long as you can do it in one liner, seems reasonable to me.
Hi! I'm not sure, that is bug, but by default
JacksonJsonProvider.class
not registrated in JerseyConfiguration module.I have situation: Simple controller:
where ApplicationInfo is POJO binded as singleton with @Singleton annotation. I run in IDE, go to /version endpoint — all goes good. I build package with maven, run it and get error
MessageBodyWriter not found for media type=application/json, type=class com.my.package.ApplicationInfo, genericType=class com.my.package.ApplicationInfo.
Other mime-types work fine.
I found solution. It's necessary to manual register JacksonJsonProvider.class in JerseyConfiguration:
Correct me if i'm wrong
PS: Thanks a lot for your lib. I have same troubles, you solution made my life easier :)