最近学习ssm框架,模仿别人做了一个小案例
当然途中也遇到了蛮多的问题.借此机会.记录一下自己的过程
struts2+spring+mybatis的整合过程
1.说明:
个人采用的是deepin操作系统(深度linux)+intellij idea(相对与myeclipse我还是更喜欢idea 可能因为更智能)+tomcat7.
当然在windows下没什么不同,具体操作过程很相似.
2.案例环境搭建
注:项目结构图
2.1准备工作
2.2 配置xml文件
2.3 实体类编写
2.4 usermapper.xml编写
2.5 dao层编写(userdao和userdaoimpl)
2.6 utils层
2.7 service层(service及其实现)
2.8 action层
2.9 applicationcontext.xml配置
2.10 mybatis-config.xml配置
2.11 struts.xml配置
2.12 user.jsp编写
user{id=1, name=’zhansan’, age=’14’}