Idea automatically generates mybatis entity class xml file

Development environment:

  1. idea_2019.2
  2. maven3.6
  3. jdk1.8
  4. mysql 8.0

Add mysql

The following provides two methods to find the location of the DataBase

Set up mysql data connection

If this error occurs

Server returns invalid timezone. Go to 'Advanced' tab and set 'serverTimezon'

时区错误,MySQL默认的时区是UTC时区,比北京时间晚8个小时。

所以要修改mysql的时长

在mysql的命令模式下,输入:

set global time_zone='+8:00';

再次连接成功

Generate entity and mapper, xml files

Find the table to be generated, right click

The configuration is as follows

Click ok to generate

Guess you like

Origin blog.csdn.net/adminBfl/article/details/104532223