s2sh架框架步骤教学内容.doc





《s2sh架框架步骤教学内容.doc》由会员分享,可在线阅读,更多相关《s2sh架框架步骤教学内容.doc(31页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Good is good, but better carries it.精益求精,善益求善。s2sh架框架步骤-今天开发了一个项目,s2sh做的,把开发的步骤记下来,Struts2.1.6Hibernate3.1Spring2.5Jdk1.6Tomcat5.5.Myeclipse6.5Sqlserver2000创建一个webproject,选中javaEE5.0然后建package,结构如下加入struts2的jar包到lib在src下建一个struts.xml文件,,加上”下一步,在web.xml文件里配置,strutrs的过滤器struts2org.apache.struts2.dispa
2、tcher.FilterDispatcherstruts2/*向工程里引入hibernateNext,next去掉框中选中的,点击finish接着再引入spring到工程里选中前三个加spring2.5weblibreriescopytolib在web.xml加入contextConfigLocationclasspath:applicationContext.xmlorg.springframework.web.context.ContextLoaderListener在src下的applicationContext.xml加上http:/www.springframework.org/sc
3、hema/aophttp:/www.springframework.org/schema/beans/spring-aop-2.5.xsdhttp:/www.springframework.org/schema/txhttp:/www.springframework.org/schema/beans/spring-tx-2.5.xsd将数据库里的表反射到工程里系统就自动生成了一个java类和一个映射文件在dao里建一个接口packagecom.dao;importcom.entity.Userinfo;publicinterfaceUserInfoDaopublicUserinfologin(
4、Stringname,Stringpwd);Dao.Impl里去实现上面的接口packagecom.dao.Impl;importjava.util.List;importorg.springframework.orm.hibernate3.support.HibernateDaoSupport;importcom.dao.UserInfoDao;importcom.entity.Userinfo;publicclassUserInfoDaoImplextendsHibernateDaoSupportimplementsUserInfoDaopublicUserinfologin(String
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- s2sh 框架 步骤 教学内容

限制150内