Transaction Propagation Considerations

 
<tx:advice id="transactionAdvice" transaction-manager="transactionManager">
		<tx:attributes>
			<tx:method name="query*" propagation="NOT_SUPPORTED" read-only="true"/>
			<tx:method name="find*" propagation="NOT_SUPPORTED" read-only="true"/>
			<tx:method name="*" propagation="REQUIRED"/>
		</tx:attributes>
	</tx:advice>

Be sure to pay attention to the definition of the transaction find method of the method, otherwise hibernate will go to the persistence when the pojo set value

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326986719&siteId=291194637