org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions
在ApplicationContext.xml 中的Action中加入 scope="prototype"
<bean id="insertFamerAction" class="com.farmer.action.InsertFamerAction" scope="prototype">
<property name="businessService">
<ref bean="businessService"/>
</property>
</bean>
本文介绍了解决org.hibernate.HibernateException: Illegal attempt to associate a collection with two open sessions的问题方法。通过在ApplicationContext.xml文件中将Action的作用域设置为prototype,可以有效避免此错误。
161

被折叠的 条评论
为什么被折叠?



