Mybatis框架开发安装步骤详解。
方法/步骤
1
1、开发环境:maven+idea
2
2、开发步骤1)创建 maven 工程;工程信息如下
3
2)添加Mybatis坐标(pom.xml 文件中添加 Mybatis3.4.5 的坐标)
5
提供get/set方法及toString方法;4)编写持久层接口UserDao(亦可写为:UserMapper);
6
5)编写持久接口层的映射文件(UserMapper.xml)
7
6)SqlMapConfig.XML中加载UserMapper.xml;
8
7)UserMapper.xml中具体配置
9
8)SqlMapConfig.XML具体配置
10
9)测试类