1. 添加jar包
2. 建库建表
3. 写配置文件conf.xml
其作用是连接数据库,写入账号密码
4. 创建实体类
声明表中的对象,写入get和set方法,写toString方法
5. 创建Mapper文件(映射文件)
写namespace(包名+类名),其中的id必须与测试类中的statement中的一致
6. 注册
在conf.xml中进行注册
<mappers>
<mapper resource="com/sxau/rjxy/mybatis_test/userMapper.xml"/>
</mappers>
7. 测试类