java jersey:JSONJAXBContext(来自jersey 1)是否在jersey 2中替换? 1 周,5 日 Questions & Answers 1254 我注意到JSONJAXBContext(来自泽西岛1)在泽西岛2消失了。那么,在Jersey 2中,将JAXB对象封送/解封为JSON的替代方法是什么 多谢各位
# 1 楼答案 JBT 您的问题已在中得到回答:Where did JSONConfiguration go in Jersey 2.5.x? 您必须使用ObjectMapperProvider: https://github.com/jersey/jersey/blob/2.5.1/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/MyObjectMapperProvider.java
# 1 楼答案
JBT 您的问题已在中得到回答:Where did JSONConfiguration go in Jersey 2.5.x? 您必须使用ObjectMapperProvider: https://github.com/jersey/jersey/blob/2.5.1/examples/json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/MyObjectMapperProvider.java