Spring学习-4
使用 Spring 简化 MyBatis(不完全)
导入 mybatis 所有jar和spring基本包,spring-jdbc,spring-tx,spring-aopspring-web,spring整合mybatis的包等

先配置 web.xml 配置spring配置文件
配置spring配置文件
- 编写代码- 正常编写 pojo
- 编写 mapper 包下时必须使用接口绑定方案或注解方案(必须有接口) 
- 正常编写 Service 接口和 Service 实现类 
- 需要在 Service 实现类中声明 Mapper 接口对象,并生成get/set 方法 
 
- **spring 无法管理 Servlet,在 service 中取出 Servie 对象**
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Kylin!
 评论












