myeclipse8.6整合SSH(图文)
整合SSH思路:
? ? ? ? 1. 确定顺序:spring->structs->hibernate,或者structs->spring->hibernate,原因我认为,spring的出现影响到hibernate生成的文件,比如sessionFactory,所以一般,包括网上其他很多的教程,都是采用把hibernate放在spring后面。
? ? ? ? 2. 版本:structs 2.1+spring 3.0 + hibernate 3.3?
具体步骤:
? ? ? ? 1. 创建一个web project:SSH
? ? ? ? 2. 添加structs

? ? ? ?选择structs的jar包

2. 添加spring

?选择版本和要添加的jar包

?生成applicationContext.xml文件

?3.添加hibernate
? ?
?
?选择版本,并且添加相关jar包

?
使用前面的spring文件
使用之前配好的数据源
??注意:不生成SessionFactory文件?
hibernate反向工程生成DAO和DTO


4.配置web.xml
添加spring监听器,添加以下代码
??配置applicationContext.xml
?List. jsp页面
??