• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
工作日志
工作日志
博客园    首页    新随笔    联系   管理    订阅  订阅
Struts2整合Spring Hibernate的CRUD实例
本文提供Struts2整合Spring Hibernate的CRUD的实例的源代码 1. 数据库脚本,数据库采用MySQL 5.0 CREATE TABLE `user` ( `id` int(11) NOT NULL auto_increment, `username` varchar(32) NOT NULL, `password` varchar(32) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; 2. 几个重要的文件 web.xml contextConfigLocation /WEB-INF/applicationContext*.xml struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 /* org.springframework.web.context.ContextLoaderListener lazyLoadingFilter org.springframework.orm.hibernate3.support.OpenSessionInViewFilter lazyLoadingFilter *.action /user/userAdd.jsp applicationContext.xml org.hibernate.dialect.MySQLDialect org/ethip/catalog/model/User.hbm.xml struts.xml userList.action /user/userList.jsp userList.action /user/userEdit.jsp userList.action 3. 本实例仅实现CRUD功能,没有实现其他的处理,如数据校验、国际化、分页等. 4. 由于附件过大,lib下所有的jar都删掉了,请各位学习者按照上一文的操作导入。 附件是ssh2目录结构
posted on 2008-11-25 14:17  滴水藏海映太阳  阅读(422)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3