Skip to content
Showing 1-2 of 2 items.
@renovate
Admin 05/06/2021 23:20
Spring Boot Transactional - Lỗi hầu hết mọi người gặp phải

1. Giới thiệu vấn đề Transaction đã được hỗ trợ trong Spring Boot Framework. Chỉ cần khai báo @Transactional trước method là xong như thế này. Theo như logic, khi có Exception xảy ra thì Transaction sẽ rollback lại các thao tác trước đó. @GetMapping("/get") @Transactional public void get() throws Exception { TestEntity testEntity = new TestEntity(); testRepository.save(testEntity); throw new...

Java Java Spring boot exception Spring Transactional