I am working on a spring boot project and have a requirement where I need to choose from a set of transaction managers based on a condition(which involves @RequestParam annotated variable) and use the selected transaction manager in the ‘value’ attribute of @Transactional annotation on a method ?
I am unable to use variables in ‘value’ attribute as it allows only constant.
Any idea on how to implement this scenario ?
I tried using variables but that didn’t help. I tried calling individual methods from a parent method but @Transactional didn’t work as expected in called method.