由POJO生成Hibernate映射文件的批处理程序
setenv.bat
-------------------------------------------
@echo off
set HIBERNATE_LIB=D:libhibernate
set CLASS_ROOT=D:workhibernate_test1classes
set CP=%CLASS_ROOT%;.;%HIBERNATE_LIB%hibernate-tools.jar;%HIBERNATE_LIB%hibernate2.jar;%HIBERNATE_LIB%commons-logging-1.0.4.jar;
class2hbm.bat
--------------------------------------------
@echo off
call d:atsetenv.bat
Java -cp %CP% net.sf.hibernate.tool.class2hbm.MapGenerator --output=%CLASS_ROOT%\%1.hbm.XML %2
----------------------
使用前要手工修改setenv.bat中的HIBERNATE_LIB和CLASS_ROOT
使用方法:
class2hbm foo full.class.name
- 上一篇:JBoss教程
- 下一篇:应用Rational 工具简化基于J2EE的项目[图]