1 导入struts1.2 2导入hibernate3.1 3加入spring 4配置 在web.xml中加入监听 <listener> 在sturts-config.xml中加入plug <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn"> 在spring配置文件applicationContext.xml中配置 配置数据源: <!-- 数据源 --> 配置Hibernate会话工厂 <bean id="sessionFactory" 配置事务管理器 class="org.springframework.orm.hibernate3.HibernateTransactionManager"> 配置Hibernate模板 <bean id="hibernateTemplate" 配置DAO <bean id="userDao" service配置 <bean id="userService" |
struts hibernate spring整合(配置的详细说明)
最新推荐文章于 2025-08-23 08:44:12 发布