[英]Hibernate Reverse Engineering to generate annotated POJO classes from database tables
我正在使用Hibernate Reverse Engineering的ant腳本從數據庫表生成帶注釋的POJO類。 在這個過程中,我想在控制台上編寫所有細節,如每個表的名稱和生成的類等。 你能幫幫我嗎?
<target name="gen_hibernate" description="Generate Hibernate POJO classes with prefix 'Gen'">
<hibernatetool >
<classpath path="${build.dir}/classes"/>
<jdbcconfiguration
configurationfile="${appdir}/generate/hibernate/hibernate.cfg.xml"
revengfile="${appdir}/generate/hibernate/hibernate.reveng.xml"
packagename="com.pojo.generated"
detectmanytomany="true"
detectoptimisticlock="true"
/>
</hibernatetool>
</target>
您應該嘗試MinuteProject ,它有一個非常好的JPA2逆向工程工具,如果你想要的話還有一個spring + hibernate層。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.