NutzCN Logo
问答 nutz能不能根据命名方式设定事务等级
发布于 2658天前 作者 老司机 1677 次浏览 复制 上一个帖子 下一个帖子
标签:

RT,类似于spring的

<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>
2 回复

有的, 基于aop的https://nutzam.com/core/aop/aop_json.html

添加回复
请先登陆
回到顶部