简体   繁体   中英

generate diagrams from hibernate models

I have the codebase and SQL creation script of a legacy Spring+Hibernate app, to be retired and migrated. I have limited knowledge of Java (and legacy frameworks), so generating a model diagram may be helpful to understand the old data (and logic).

The SQL script has no foreign keys, but noticed XMLs annotated with models with fields and their relationships for Hibernate.

What's the easiest way to generate model diagrams from these Hibernate XMLs? DjangoGraphviz could be installed to generate models diagrams in a moment. Is there a similar method/tool with Hibernate?

With Hibernate you have Java references between the entities, so any tool visualizing class dependencies might help.

I'm the author of it so I obviously recommend Degraph , but there are many out there. Just google java dependency visualization.

i don't now of any tools to do that in a straight forward way.

  • you could of course do it on your own. for example use xslt to transform your xml-mapping files to the graphml (xml) format and use a tool like 'yed' ( https://www.yworks.com/en/products/yfiles/yed/ ) to layout and draw a nice diagram.

  • as a tool to understand legacy code doxygen has served me well because it allows you to browse the package structure, the source, the javadoc and generated UML Diagrams at the same time.

  • if you need to understand the structures at a database level ... i found Schemacrawler quite helpful.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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