How to create pojo classes from XSD?

前端 未结 3 1117
我寻月下人不归
我寻月下人不归 2021-02-02 15:35

I am using Spring maven plugin, I want to create POJO classes from specified xml schema in particular folder. I tried with xjc command through java code, but its no

3条回答
  •  梦如初夏
    2021-02-02 16:10

    My recommendation is to go with JAXB.

    I have tested it in eclipse, works well for me. My suggestion is try generating the POJO from command line or with the help of eclipse. Once successful configure it with maven to generate the POJO build time.

    There are several tutorials to learn this, please follow the below link(s) based upon your preference:

    • Generate POJO Class from XSD in Eclipse
    • Generate POJO class from XSD Schema command line
    • Generate POJO Classes from XSD using XJC Maven Plugin

    Also the youtube links:

    • Youtube video tutorial
    • Youtube tutorial using maven

    I hope it helps!

    Feel free to comment if you encounter any issue.

提交回复
热议问题