rev:操作日志问题修改
This commit is contained in:
@@ -15,7 +15,7 @@ import javax.sql.DataSource;
|
||||
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class DataBaseConfig implements TransactionManagementConfigurer {
|
||||
public class DataBaseConfig {
|
||||
|
||||
@Primary
|
||||
@Bean(name = "dataSource")
|
||||
@@ -24,20 +24,4 @@ public class DataBaseConfig implements TransactionManagementConfigurer {
|
||||
return new DruidDataSource();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Resource(name="transactionManager")
|
||||
private PlatformTransactionManager transactionManager;
|
||||
|
||||
// 创建事务管理器
|
||||
@Bean(name = "transactionManager")
|
||||
public PlatformTransactionManager transactionManager(DataSource dataSource) {
|
||||
return new DataSourceTransactionManager(dataSource);
|
||||
}
|
||||
|
||||
// 实现接口 TransactionManagementConfigurer 方法,其返回值代表在拥有多个事务管理器的情况下默认使用的事务管理器
|
||||
@Override
|
||||
public PlatformTransactionManager annotationDrivenTransactionManager() {
|
||||
return transactionManager;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user