简体   繁体   English

从现有数据库或JPA实体生成XSD模式

[英]Generate XSD schemas from an existing database or JPA entities

I have been using hyperjaxb tool to generate JPA entities and database scripts from XSD schemas. 我一直在使用hyperjaxb工具从XSD架构生成JPA实体和数据库脚本。 Now I want basically the inverse operation. 现在我基本上需要逆运算。 How can I generate XSD schemas based on JPA anotated entities or database? 如何基于JPA注释的实体或数据库生成XSD架构? I am using Maven, so any maven solution would be preferable. 我正在使用Maven,因此任何Maven解决方案都是可取的。

If you're using IntelliJ IDEA, see the following link: 如果您使用的是IntelliJ IDEA,请参见以下链接:

https://www.jetbrains.com/idea/help/generate-xml-schema-from-java-using-jaxb-dialog.html https://www.jetbrains.com/idea/help/generate-xml-schema-from-java-using-jaxb-dialog.html

This maven plugin ( jaxb2-maven-plugin ) might be useful for you. 这个maven插件(jaxb2-maven-plugin)对您可能有用。 This post has more information about its usage and the given example uses POJO's to do the transformation 这篇文章有关于用法的更多信息,并且给定的示例使用POJO进行转换

Generate XSD from Java class 从Java类生成XSD

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM