Spring + Hibernate + Struts批量更新 我刚开始也想传个LIST,然后循环执行删除或修改语句,但是事务能否得了控制。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 事务是否控制,要看你的spring是怎么配的了 对啊,你spring对你的dao是怎么配置事物的。 <bean id="userRoleImpl" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"> <ref bean="transactionManager" /> </property> <!-- 源于spring-struts.xml--> <property name="target"> <ref local="userRoleTarget" /> </property> <property name="proxyTargetClass"> <value>true</value> </property> <property name="transactionAttributes"> <props> <prop key="save*">PROPAGATION_REQUIRED</prop> <prop key="remove*">PROPAGATION_REQUIRED,readOnly</prop> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> </bean> 前面贴的不清晰,看下面的<bean id="userRoleDao" class="com.yims.dao.hibernate.UserRoleDaoHibernate"> <property name="sessionFactory"> <ref local="sessionFactory" /> </property> </bean> <bean id="userRoleTarget" class="com.yims.service.impl.UserRoleImpl"> <property name="userRoleDao"> <ref local="userRoleDao" /> </property> </bean> <bean id="userRoleImpl" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"> <ref bean="transactionManager" /> </property> <property name="target"> <ref local="userRoleTarget" /> </property> <property name="proxyTargetClass"> <value>true</value> </property> <property name="transactionAttributes"> <props> <prop key="save*">PROPAGATION_REQUIRED</prop> <prop key="remove*">PROPAGATION_REQUIRED,readOnly</prop> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> </bean> 关于字符串相加慢问题(非变量) dwr dojo json gwt ognl 求一个简单的struts+sping+hibernate整合的demo~ 初学小总题,在线等啊.........急...... spring整合Hibernate报错,请高手相助! 急急 请问大家现在STRUTS都用什么版本的了! java socket 与 c语言写的socketServer的通信问题,急 请问如何实现全文检索? 自定义标签 ,急急急!!!!!!!!!!!!!!!! 关于hibernate使用sequence级联更新的问题 ★★★★80分求助问题解答,牛人请进,比较难的问题!★★★★
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<!-- 源于spring-struts.xml-->
<property name="target">
<ref local="userRoleTarget" />
</property>
<property name="proxyTargetClass">
<value>true</value>
</property>
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="remove*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
<bean id="userRoleDao" class="com.yims.dao.hibernate.UserRoleDaoHibernate">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean> <bean id="userRoleTarget" class="com.yims.service.impl.UserRoleImpl">
<property name="userRoleDao">
<ref local="userRoleDao" />
</property>
</bean> <bean id="userRoleImpl" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<ref local="userRoleTarget" />
</property>
<property name="proxyTargetClass">
<value>true</value>
</property>
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="remove*">PROPAGATION_REQUIRED,readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>