mybatis插件 mybatis generator
https://github.com/mybatis/generator
下载文件,将其目录放在MyEclipse目录中的
dropins目录中如:D:\myeclipse\MyEclipse 10\dropins
重启MyEclipse,新建项目右键点击项目,new other 输入m,找到mybatis插件,说明安装成功,
新建生成文件,如下:
https://github.com/mybatis/generator
下载文件,将其目录放在MyEclipse目录中的
dropins目录中如:D:\myeclipse\MyEclipse 10\dropins
重启MyEclipse,新建项目右键点击项目,new other 输入m,找到mybatis插件,说明安装成功,
新建生成文件,如下:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" >
<generatorConfiguration >
<classPathEntry location="D:\china_cpp\projects\gctsys\WebRoot\WEB-INF\lib\mysql-connector-java-5.1.32.jar"/>
<context id="context1" >
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/gct?characterEncoding=UTF-8" userId="root" password="123456" />
<javaModelGenerator targetPackage="com.test.entity" targetProject="test" />
<sqlMapGenerator targetPackage="com.test.dao" targetProject="test">
</sqlMapGenerator>
<javaClientGenerator targetPackage="com.test.dao" targetProject="test" type="XMLMAPPER" />
<table schema="" tableName="frw_user" enableCountByExample="false" enableDeleteByExample="false" enableSelectByExample="false" enableUpdateByExample="false" selectByExampleQueryId="false" >
</table>
</context>
</generatorConfiguration>