Spring配置事务管理的一个疑惑!!! 在其他的方法比如,save、add、delete等,read-only默认为false,既可以读写的。这一句:<tx:method name="*" read-only="true" />,不写有没有影响? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!-- Transaction manager for a single jdbc --> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource"> <ref bean="dataSource" /> </property> </bean> <bean id="transactionInterceptor" class="org.springframework.transaction.interceptor.TransactionInterceptor"> <property name="transactionManager" ref="transactionManager" /> <property name="transactionAttributes"> <props> <prop key="*">PROPAGATION_REQUIRED,-MessageException</prop> </props> </property> </bean> <!-- 事务自动代理 --> <bean id="serviceProxy" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <property name="beanNames"> <!--自定义代理service <list> <value>userManageService</value> </list> --> <value>*Service</value> </property> <property name="interceptorNames"> <list> <value>transactionInterceptor</value> </list> </property> </bean> 如果你写成true的话,你要执行save delete add 就会报告错误,因为你的数据是只读的,一般情况下查询设置只读 readonly 不写的话就是默认为false了 微博api无法获取头像图片 页面跳转去掉ie中的标志按钮 mysql全文索引 JPA的table策略的initialValue属性的设置,非常急! 使用smartupload组件实现下载在浏览器中显示乱码问题 关于数据库连接--郁闷中 100分求教,不够再加! 关于java,有谁能帮帮我啊,郁闷 两个问题,在线等 jsp显示问题?~--〉? hibernate 的 datetime 类型的模糊查询? java 初学者遇到的怪问题 ,请高手解答一下
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean> <bean id="transactionInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager" />
<property name="transactionAttributes">
<props>
<prop key="*">PROPAGATION_REQUIRED,-MessageException</prop>
</props>
</property>
</bean>
<!-- 事务自动代理 -->
<bean id="serviceProxy"
class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames">
<!--自定义代理service <list> <value>userManageService</value> </list> -->
<value>*Service</value>
</property>
<property name="interceptorNames">
<list>
<value>transactionInterceptor</value>
</list>
</property>
</bean>
如果你写成true的话,你要执行save delete add 就会报告错误,因为你的数据是只读的,一般情况下查询设置只读