更新时间:2023-01-25 17:07:45
JAXB 的 JSON 支持怎么样?重用当前的 JAXB 注释模型类,但从 REST 端点输出 JSON.
How about JSON support for JAXB? Reuse your current JAXB annotated model classes but output JSON from your REST endpoints.
Jersey 的当前版本支持这一点(通过 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.