JAXB and class instantiation

后端 未结 1 1778
花落未央
花落未央 2021-01-15 06:01

One thing that prevents from using a binding technology like JAXB, instead of a classic dom/sax-based xml technology is the fact that, when reading xml, it seems to be stron

1条回答
  •  生来不讨喜
    2021-01-15 06:29

    Use the JAXB objects as DTOs. Then you can use PropertyUtils.copyProperties(..) / BeanUtils.copyProperties(..) (from commons-beanutils) to transfer the properties to your already-partially-populated objects.

    0 讨论(0)
提交回复
热议问题