SSH整合步骤,三大框架的整合步骤
2014-05-30 14:40
302 查看
SSH整合步骤:
1、添加spring框架
2、添加hibernate框架
3、添加struts框架
4、添加4个包分别是:
com.scme.ssh.action
com.scme.ssh.biz
com.scme.ssh.dao
com.scme.ssh.persist
5、通过Hibernate对数据库的映射,实现持久层
6、写DAO层(BaseDao)
7、写业务层(biz)
8、实现action
9、在struts.xml中配置action
10、给业务层、action层分别建一个spring配置文件
11、完成各层注入配置
在dao层中注入sessionFactory
在biz层中注入dao
在action层中注入biz
12、在web.xml中配置启动spring文件
13、在web.xml中配置struts信息
1、添加spring框架
2、添加hibernate框架
3、添加struts框架
4、添加4个包分别是:
com.scme.ssh.action
com.scme.ssh.biz
com.scme.ssh.dao
com.scme.ssh.persist
5、通过Hibernate对数据库的映射,实现持久层
6、写DAO层(BaseDao)
7、写业务层(biz)
8、实现action
9、在struts.xml中配置action
10、给业务层、action层分别建一个spring配置文件
11、完成各层注入配置
在dao层中注入sessionFactory
在biz层中注入dao
在action层中注入biz
12、在web.xml中配置启动spring文件
<context-param> <param-name>contextConfigLocation</param-name> <param-value>classPath*:application*.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>
13、在web.xml中配置struts信息
<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
相关文章推荐
- SSH三大框架整合步骤
- ssh三大框架整合的简易步骤
- SSH三大框架整合配置详细步骤(1)
- SSH三大框架整合配置详细步骤(3)
- SSH三大框架整合步骤
- SSH三大框架整合配置详细步骤(3)
- SSH三大框架整合配置详细步骤(1)
- 三大框架整合ssh(二)------DAO层 源码
- 三大框架整合ssh(三)-----service层
- Kindeditor(jsp)与SSH三大框架整合上传图片出错问题解决方案
- 有关我在SSHD(SSH三大框架和DWR框架)整合过程中出现的中文乱码问题的解决
- ssh三大框架的整合
- Kindeditor(jsp)与SSH三大框架整合上传图片出错问 3ff8 题解决方案
- SSH三大框架整合需要的JAR包
- SSH三大框架整合出现包冲突,要删除的jar包
- 三大框架整合ssh(四)-----controller层及页面
- 浅谈ssh(struts,spring,hibernate三大框架)整合的意义及其精髓
- SSH Java三大框架整合(Struts 2+Hibernate+Spring+mysql)
- ssh三大框架整合 getHibernateTemplate
- ssh三大框架整合的配置