MyEclipse6.5.0构建S2SH(struts2.2+spring2.5+hibernate3.2)项目

MyEclipse6.5.0构建S2SH(struts2.2+spring2.5+hibernate3.2)项目

 1、工具添加hibernate3.2;默认。删除hibernate.cfg.xml
 2、工具添加spring2.5;前四个和Web
 3、手动添加struts.xml、struts.properties
 4、配置web.xml;监听器加载spring文件、过滤器加载struts文件
 5、自动生成entity文件;
 6、配置applicationContext.xml;数据源、sessionFactory、事务
 7、试运行;先删除
  spring的asm-2.2.3.jar
  hibernate的xerces2.6.2.jar
  hibernate的cglib2.1.3.jar
  hibernate的asm-attrs.jar
      添加struts2.2包如下:
  aopalliance-1.0.jar
  classworlds-1.1.jar
  commons-beanutils-1.7.0.jar
  commons-chain-1.2.jar
  commons-collections-3.1.jar
  commons-digester-2.0.jar
  commons-fileupload-1.2.2.jar
  commons-io-2.0.1.jar
  commons-lang-2.5.jar
  commons-logging-1.1.1.jar
  commons-logging-api-1.1.jar
  commons-validator-1.3.1.jar
  freemarker-2.3.16.jar
  json-lib-2.1-jdk15.jar
  ognl-3.0.1.jar
  oro-2.0.8.jar
  struts2-convention-plugin-2.2.3.1.jar
  struts2-core-2.2.3.1.jar
  struts2-embeddedjsp-plugin-2.2.3.1.jar
  struts2-json-plugin-2.2.3.1.jar
  struts2-spring-plugin-2.2.3.1.jar
  xwork-core-2.2.3.1.jar

(备注:以上包有重复,但没有冲突)
 8、编写DAO;
 9、编写Service,注入DAO;
 10、编写Action,注入Service;
 11、编写jsp表单;
 12、spring文件管理Action;
 13、配置struts.xml。

试运行,ok

你可能感兴趣的:(DAO,spring,Hibernate,MyEclipse,struts,service)