I've a number of controllers with a lot of methods that deal with transactions... and I want to set transaction timeout to 60 for all of them:
@AllArgsConstructor
@Controller
public class MyController {
@Transactional(timeout = 60)
public void myMethod1(...) {
}
@Transactional(timeout = 60)
public void myMethod2(...) {
}
...
}
How do I set the default timeout to 60 globally so that I no longer need to specify timeout = 60
for each method?
BeanPostProcessor
to set the property, so that one can rely on the auto-configuration of Spring Boot to construct the proper tx-manager. – Wring