How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Can't rollback a spring transaction

calendar_today June 23, 2026 person arsrobota domain spring-boot

In a project I need to import a CSV file into database, and the operation must be rollbacked in the case of any problem. A service calls a helper to read data from file and put them in a List , then it calls a repository extending CrudRepository to persist data with saveAll() . I added @Transactional annotations above the repository’s saveAll() and the service’s import method.

open_in_new Read original post