Maven安装MyBatis Generator
一直依赖我都不是很喜欢自动生成代码的工具,因为生成出来的代码不是很好的,适应性不好! 再说,自己写一些代码也是消耗不了多少时间的。但是应同学的要求,我帮他安装了MyBatis Generator。pom.xml:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
org.mybatis.generator
mybatis-generator-maven-plugin
1.3.2
true
true
org.mybatis.generator
mybatis-generator-core
1.3.2
在/voicelog/src/main/resource/中放入generatorConfig.xml文件:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<classpathentry
location="D:Codemaven3epom2mysqlmysql-connector-java.1.37mysql-connector-java-5.1.37.jar" />
<jdbcconnection driverclass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/yii"
userId="root" password="root" />
</classpathentry
Myeclipse安装MyBatis Generator插件:
http://mybatis.googlecode.com/svn/sub-projects/generator/trunk/eclipse/UpdateSite/
安装成功后:
执行即可!
页:
[1]