Java_myBatis_逆向工程

所谓逆向工程,就是根据数据库自动生成项目工程(包括了Interface、POJO、映射文件xml)

逆向工程包:https://github.com/wcyong/mybatisGeneratorCustom.git

分两步:

1.修改配置文件 “generatorConfig.xml

1)修改jdbcConnection的连接字符串,登陆账号和密码

2)修改javaModelGenerator、javaModelGenerator、sqlMapGenerator的命名空间名字

3)添加修改指定数据库表 例如:<table tableName="class_table" schema=""></table>

2.到srcdefault package下"run as java application"

最后,刷新一下项目就发现逆向工程已经出现

猜你喜欢

转载自www.cnblogs.com/amiezhang/p/9615338.html