本文基於Spring 中的 Cache 組件 (2) - @Transactional + @CacheEvict 同時使用時,刪除緩存異常並不會導致事務被回滾 一文中的闡述,補全攔截器 BeanFactoryCacheOperationSourceAdvisor 和 BeanFactoryTransactionAttributeSourceAdvisor 的執行順序成因。
見下文!
Spring的Cache組件 - @Transactional + @CacheEvict 在同一方法上聲明,刪除緩存異常是否導致事務回滾?_noob_can的博客-CSDN博客