这个插件本来是为Mybatisplus设计的一个插件,可以帮我们根据指定的数据库表自动的生成javabean/mapper接口/mapper配置文件/service接口/service实现类
但是现在我们还没有学习mybatisplus,我们只利用这个插件生成javabean/mapper配置文件
File->Settings->Plugins
点击DataSource->点击“+”
点击DataSource->点击MySQL
驱动选择MySQL for 5.1
输入主机IP、端口号、数据库的用户名和密码->点击Test Connection
==================================================================
点击Test Connection这一步有可能报错:Failed [08S01] Communications link failure The last packet successfully received from the server was 89 milliseconds ago. The last packet sent successfully to the server was 81 milliseconds ago. No appropriate protocol (protocol is disabled or cipher suites are inappropriate).
用IDEA连接数据库是时,报以下错误
点击Advanced,把useSSL改成false,如果不可以,再改成no,就可以正确连接, 我的是改成no就可以了
==================================================================
点击Download Driver Files
测试成功->点击OK
zheyi
点击1 of 6 选择数据库
选择你想要逆向生成的表->右击->点击MybatisX-Generator
选择None
选择lombok
选择default-empty