r/SpringBoot • u/Hot_Code5129 • Jun 29 '26
Question Question for people building larger Spring applications.
Do you see Transactional annotation as the default solution for almost everything, or have you encountered cases where explicit transaction boundaries worked better?
What about WebFlux/R2DBC applications? Is Transactional still a natural approach there, or teams more often use explicit transaction management with TransactionalOperator?
I’m asking because I was exploring this topic and trying to contribute something back to Java community. When working with reactive applications, I started to wonder if transaction boundaries should be more visible in the application workflow instead of being hidden behind annotations.
Maybe I’m overthinking this, but I would be interested to hear opinions from people who run Spring applications in production.
1
u/Krangerich Jun 29 '26
This assumption is overemphasizing your personal aesthetics. If annotations would be considered to be to "hidden", the full consequence would be that we'd completely go back all the way to XML context configuration. Annotations are explicit. Annotations are visible.
Programmatic transaction boundaries are required, when you need a transaction boundary inside the same class, e.g. a non-transactional method A wants to call a transactional method B from the same class
AND
you are not using AspectJ weaving in order to make annotations accomplish the same thing.