HttpClient TX – Spring Boot 168 EP 22-7

建立第三方 API 的 Service 後,HttpClient TX 將把交易從 Service 抽離,獨立為單一類別,因內部調用 @Transactional 將不會有作用,加上交易隱含著鎖的概念,前置檢查、資料庫查詢等,將不寫在交易裡面,Spring Boot 168 EP 22-7 使用 Spring Data JPA 增加範例 ,並透過 JUnit 5 來驗證產出結果。

Continue ReadingHttpClient TX – Spring Boot 168 EP 22-7