在配置文件后加?serverTimezone=UTC <property name="url" value="jdbc:mysql://localhost:3306/mybatis?serverTimezone=UTC"/>