How to use JAXB annotations at runtime

前端 未结 3 760
感情败类
感情败类 2020-12-18 16:12

I have the following bean class

@XmlRootElement(name = \"book\")
//Optional
@XmlType(propOrder = {\"name\" })
public class Book {

private String name;
priv         


        
3条回答
  •  佛祖请我去吃肉
    2020-12-18 17:00

    Note: I'm the EclipseLink JAXB (MOXy) lead and a member of the JAXB 2 (JSR-222) expert group.

    The MOXy JAXB implementation offers the ability to manipulate the mapping metadata at runtime via its MetadataSource extension. For a detailed example see:

    • http://blog.bdoughan.com/2011/06/moxy-extensible-models-refresh-example.html

提交回复
热议问题