MyBatis逆向工程--反向生成
逆向工程:创建MyBatis逆向工程,自动根据数据库表生成实体类、dao接口、接口映射文件。
步骤
- 创建项目工程:mybatis_generate
- 添加依赖:pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.longhong</groupId>
<artifactId>mybatis_generate</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>