更新时间:2023-01-25 17:16:44
JSON对JAXB的支持如何?重用当前带有JAXB注释的模型类,但从REST端点输出JSON。
How about JSON support for JAXB? Reuse your current JAXB annotated model classes but output JSON from your REST endpoints.
当前版本的泽西岛支持这一点(通过 jersey = json 模块) JSONJAXBContext 。
Current versions of Jersey support this (via the jersey-json module) with JSONJAXBContext.
您也可以尝试 Jackson 的 JAXB 和 JAX-RS 支持。
You could also try Jackson's JAXB and JAX-RS support.