jersey and jackson maven dependency issues?

后端 未结 3 1858
粉色の甜心
粉色の甜心 2021-01-20 18:44

I have just started building a web app using jersey and jackson. After initially getting up and running I decided that it made sense in the long run to convert the project t

3条回答
  •  一个人的身影
    2021-01-20 19:11

    The jersey-json dependencies have its own jackson dependency.

    For Jersey 1.8 its Jackson 1.7.1. So, start by removing the 1.8.1 and 1.8.2 dependencies, they may cause trouble. Maven is not deterministic: if it encounters two versions of the same dependency (with the same count), the chosen one cannot be predicted.

    You don't have to create a JSON string neither to call Jackson mapper yourself. Take a look a this fully working/tested app I've post on GitHub. Hope it will help.

提交回复
热议问题