환경 : Spring Boot 6, HikariDataSource 사용 데이터베이스 Insert 및 Update 하는 과정에서 예외가 발생된다면 해당 과정들의 데이터를 다시rollback 해야 하는 상황이 나타난다. 이러한 과정에서 예외가 발생하지 않았을 때 최종적으로 Insert 및 Update 를 하고예외가 발생했을 때 rollback 하기 위해선 Spring 에서 제공하는 Transaction 기술을 사용해야한다.자세한 내용은 Spring 공식문서에 나와있다. https://docs.spring.io/spring-framework/reference/data-access/transaction/strategies.html Understanding the Spring Framework Transactio..
DataSoruce TransactionManager 설정(commit, rollback)
환경 : Spring Boot 6, HikariDataSource 사용 데이터베이스 Insert 및 Update 하는 과정에서 예외가 발생된다면 해당 과정들의 데이터를 다시rollback 해야 하는 상황이 나타난다. 이러한 과정에서 예외가 발생하지 않았을 때 최종적으로 Insert 및 Update 를 하고예외가 발생했을 때 rollback 하기 위해선 Spring 에서 제공하는 Transaction 기술을 사용해야한다.자세한 내용은 Spring 공식문서에 나와있다. https://docs.spring.io/spring-framework/reference/data-access/transaction/strategies.html Understanding the Spring Framework Transactio..
2024.09.12