今天看到了个SSM项目,看到下面这段
<!-- 事务配置 -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource">
<ref local="dataSource" />
</property>
</bean>
<bean id="transactionInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager"></property>
<property name="transactionAttributes">
<props>
<prop key="get*">PROPAGATION_REQUIRED, readOnly</prop>
<prop key="query*">PROPAGATION_REQUIRED, readOnly</prop>
<prop key="find*">PROPAGATION_REQUIRED, readOnly</prop>
<prop key="search*">PROPAGATION_REQUIRED, readOnly</prop>
<prop key="list*">PROPAGATION_REQUIRED, readOnly</prop>
<prop key="delOne*">PROPAGATION_REQUIRED, readOnly</prop>
<prop key="*">PROPAGATION_REQUIRED , -Exception</prop>
</props>
</property>
</bean>
说是配置全局的事务级别的,请问nutz有这样的方法吗?我也不想每次都new Atom