1、创建数据库表语句
2、插入测试数据
3、pom文件内容
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <environments default="development"> <environment> <transactionManager type="JDBC"/> <dataSource type="POOLED"> <property value="com.mysql.jdbc.Driver"/> <property value="jdbc:mysql://127.0.0.1:3306/mybatis01"/> <property value="root"/> <property value="root"/> </dataSource> </environment> </environments> <mappers> <!-- jack.zhao 加载映射文件 --> <mapper resource="com/mybatis03/mapper/personMapper.xml"/> <mapper resource="com/mybatis03/mapper/TeacherMapper.xml"/> </mappers> </configuration>