struts2+hibernate整合开发步骤
2016-09-10 20:20
295 查看
百度的各种代码,步骤,自己整合了一下
1,创建数据库
常用mysql creat table.....
2,在WebContent下的bin中添加相应的包
http://pan.baidu.com/s/1c2DR2co
本人的百度云盘分享
3,创建实体类以及相应的映射文件、
例如stuinfo.java和stuinfo.hbm.xml
stuinfo.java中包含,私有成员对象和getter,setter方法
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app>View Code
7,编写显示界面jsp文件
相关文章推荐
- 23SpringMvc_各种参数绑定方式-就是<input那种
- Java 版本6下载大全
- Cookie和Session会话管理基础
- java方法
- Java设计模式—解释器模式&迭代器模式简介
- Java设计模式—解释器模式&迭代器模式简介
- java war run
- taglib cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'.
- Java设计模式—享元模式
- Java设计模式—享元模式
- Java泛型总结
- IT技术学习路线
- Java设计模式------单例模式
- Java总结——文件&流
- Java中的类型信息
- maven学习笔记之三、构建第一个java web工程
- SpringMvc学习记录
- Java设计模式—组合模式
- Java设计模式—组合模式
- 不引入第三变量实现互换两个int类型的值