mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 09:08:24 +08:00
fix: 与spring-data-jpa混用时候,提醒No bean named 'transactionManager' available错误
1. 在使用了jpa的项目中引入了mybatis-flex后,FlexTransactionAutoConfiguration会初始化一个PlatformTransactionManager,jpa的自动初始化transactionManager就不会执行,但是jpa使用的时候beanName是transactionManager,导致默认情况下会找不到该bean
This commit is contained in:
parent
ed5a2fd398
commit
af78904674
@ -46,7 +46,7 @@ public class FlexTransactionAutoConfiguration implements TransactionManagementCo
|
||||
*/
|
||||
private final FlexTransactionManager flexTransactionManager = new FlexTransactionManager();
|
||||
|
||||
@Bean
|
||||
@Bean(name = "transactionManager")
|
||||
@Override
|
||||
public PlatformTransactionManager annotationDrivenTransactionManager() {
|
||||
return flexTransactionManager;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user