<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