12.整合Mybatis
步骤:
导入jar包
- junit
- mybatis
- mysql
- spring
- aop织入
- mybatis-spring
编写配置文件
测试
12.1回忆Mybatis
编写实体类
编写核心配置文件
编写接口
编写Mapper.xml
测试
12.2Mybatis-spring
- 编写数据源
- sqlSessionFactory
- selSessionTemplate
- 需要给接口加实现类
- 将自己写的实现类,注入到Spring中
- 测试使用
步骤:
导入jar包
编写配置文件
测试
编写实体类
编写核心配置文件
编写接口
编写Mapper.xml
测试