我收到以下错误, 在类路径资源中定义的名称为'transactionManager'的无效bean定义
2019-08-28 12:31:29.856 WARN 16020 --- [main] ConfigServletWebServerApplicationContext:上下文初始化期间遇到异常-取消刷新尝试:org.springframework.beans.factory.support.BeanDefinitionOverrideException:名称无效的bean定义在类路径资源[net / xxxxx / xxxxx / xxxxx / config / MariaDbConfiguration.class]中定义的'transactionManager':无法注册bean定义[root bean:class [null]; scope =; abstract = false; lazyInit = false; autowireMode = 3; dependencyCheck = 0; autowireCandidate = true; primary = true; factoryBeanName = mariaDbConfiguration; factoryMethodName = transactionManager; initMethodName = null; destroyMethodName =(推断);在类路径资源[net / xxxxx / xxxxx / xxxxx / config / MariaDbConfiguration.class]中为bean'transactionManager'定义:已经存在[Root bean:class [null]; scope =; abstract = false; lazyInit = false; autowireMode = 3; dependencyCheck = 0; autowireCandidate = true; primary = false; factoryBeanName = org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration; factoryMethodNameoryMethodName = transactionManager; initMethodName = null; destroyMethodName =(推断);在类路径资源[org / springframework / batch / core / configuration / annotation / SimpleBatchConfiguration.class]中定义。 2019-08-28 12:31:29.869 INFO 16020 --- [main] ConditionEvaluationReportLoggingListener: 启动ApplicationContext时出错。要显示条件报告,请在启用“调试”的情况下重新运行您的应用程序。 2019-08-28 12:31:29.875错误16020 --- [main] o.s.b.d.LoggingFailureAnalysisReporter:
申请无法开始
描述: 在类路径资源[net / xxxxx / xxxxx / xxxxx / config / MariaDbConfiguration.class]中定义的bean'transactionManager'无法注册。已经在类路径资源[org / springframework / batch / core / configuration / annotation / SimpleBatchConfiguration.class]中定义了具有该名称的Bean,并且禁用了覆盖。 行动: 考虑重命名其中一个Bean或通过设置spring.main.allow-bean-definition-overriding = true启用覆盖 流程结束,退出代码为1