1.下载并安装EasyCode插件
Setting->Plugins。搜索EasyCode插件,并重启Idea编辑器
2.配置MYSQL数据源
配置完第一次需要下载依赖
Test Connection
下载后如果出现
Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezon’
解决方法: 在Advanced中将serverTimezone设置成Hongkong即可
然后点击创建
根据自己需求选择
最后效果图
记得要在dao层上加注解@mapper !
可能需要依赖
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>3.3.2</version>
</dependency>