---
title: "eclipse 添加MyBatisGenerator插件"
author: "lastsoul"
date: "2015-05-27T15:36:31Z"
tags: []
categories: ["非技术"]
slug: "eclipse-mybatisgenerator"
draft: false
lastmod: "2015-05-27T15:49:50Z"
id: 2214799
url: "https://lastsoul.iteye.com/blog/2214799"
---

文件：MyBatisGenerator 下载附件或者从以下地址下载

地址：http://pan.baidu.com/disk/home#dir/path=%252F%25E6%2588%2591%25E7%259A%2584%25E6%2596%2587%25E6%25A1%25A3

1.打开‘MyBatis_Generator_1.3.1.zip’文件并解压解压为2个文件夹

2.拷贝‘features’和‘plugins’ 文件夹到 ‘eclipse’的安装目录下，如果已经存在这两个文件夹，则只需将这两个文件夹下的文件分别拷贝进去。

3.重新启动eclipse.


注意：
在mybatisGenerator 配置文件中，可以去掉默认的注释，但是会有一个小BUG，生成的代码会有双份。所以要么不要去掉注释，要么去掉注释手动删除多余的代码。

相关代码如下：
<commentGenerator>
    <!-- 是否去除自动生成的注释 true：是 ： false:否 -->
    <property name="suppressAllComments" value="false" />
</commentGenerator>