spring + hibernate 整合环境搭建
1.导入jar包
2.配置web.xml
3配置applicationContext.xml
<bean id="sessionfactory" class="org.springframework.com.hibernate3.LoclsessionFactoryBean">
<property name="hibernateProperty">
连接字符串
驱动字符串
用户名密码..
</property>
<--加入映射文件-->
<property>
<value>
com/fit/bean/User.hbm.xml
</value>
</property>
<--依赖注入-->
将spring生成的Sessionfactory注入到service
</bean>