Closed frederic-gendebien closed 4 years ago
It can't created from DataSourceTransactionManager as SpringTransactionManager should override some methods of DSTM
I will exclude DataSourceTransactionManagerAutoConfiguration from auto-configuration via spring.factories
. Hope that will help.
In servlet context i.e. WildFly i had same problem and excluding org.springframework.boot.autoconfigure.transaction.jta.JtaAutoConfiguration helped me
GIVEN: spring-boot.version: 2.2.4.RELEASE exposed.version: 0.23.1 WHEN: Application starts THEN: Application crashes: Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.transaction.TransactionManager' available: expected single matching bean but found 2: transactionManager,springTransactionManager
You have spring-boot-starter-data-jdbc which creates a spring TransactionManager through DataSourceTransactionManagerAutoConfiguration and you create another one through ExposedAutoConfiguration
It cannot work!
I think you should create an Exposed TransactionManager from the existing Spring DataSourceTransactionManager and just expose that interface not the spring one