【文件属性】:
文件名称:SHH简单集成示例
文件大小:27.56MB
文件格式:ZIP
更新时间:2017-06-04 14:18:12
ssh
项目包SSH
环境:eclipse下ssh集成,数据库mysql
运行:
1、直接导入该SSH项目
2、applicationContext-common.xml对dataSource修改为你的url,username,password.
3、在com.ssh.test中右键junit test 运行向数据库中自动建表,录入数据
4、部署该项目到tomcat.
5、启动tomcat,在浏览器输入http://localhost:8080/SSH/
辅助:
该项目示例对于hibernate,spring,struts进行集成,项目内容比较简单,主要是为了对ssh感兴趣的同学示范如何构建ssh.
包含:
1、hibernate jpa持久注解注入
2、spring 注解注入,组件扫描 @Resource @Repositroy @Service @Controller
3、struts控制转向
3、对于applicationContext-common.xml和web.xml中配置项的作用进行了描述,让初学者了解每项配置的作用。
4、对于每项配置所需要的jar包在Jar文件夹中进行了分类,让大家可以了解每个jar包的作用,避免今后在项目中添加多余的jar包。
5、如hibernate单独使用只需common+hibernate这两个文件夹中的jar包
hibernate和spring集成只需common+hibernate+spring这三个文件夹中的jar
还可以根据文件夹中的introduce.txt根据自己的项目实际需要添加.