spring
1、第一个mybatis程序思路流程:搭建环境--》导入mybatis--》编写代码--》测试
1. 搭建数据库
2. 编写javaBean
3. 导入mybatis相关jar包
4. 编写mybatis核心配置文件
5. 编写mybatis工具类
6. 编写mapper接口(相当于dao)
7. 编写mapper.xml配置文件(相当于接口的实现类)
8. 编写测试
可能出现:Maven静态资源过滤问题
1. sql语句返回值类型。【完整的类名或者别名】 resultType
2. 传入sql语句的类型参数 : parameterType
3. 接口中的方法名与映射文件中的sql语句id一一对应 : id
?useUnicode=true&characterEncoding=utf-8&useSSL=true?useUnicode=true&characterEncoding=utf-8&useSSL=true

浙公网安备 33010602011771号