---------spring 中配置hibernateTemplate模板:
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory">
<ref bean="sessionFactory"></ref>
</property>
</bean>
---------spring 中配置实现类:
<bean id="productdaoimpl" class="org.henry.shop.dao.impl.ProductDAOImpl">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate"></ref>
</property>
</bean>
-----------struts-config.xml中需要添加的配置
<controller
processorClass="org.springframework.web.struts.DelegatingRequestProcessor">
</controller>
<message-resources
parameter="org.***" />
<plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/classes/applicationContext.xml" />
</plug-in>
---------web.xml中需要添加的配置
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/classes/applicationContext.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
并修改jar文件,将common-pool.jar加入工程,并将asm-2.2.3.jar删除