The bean 'businessDataRecordMapper' could not be registered. A bean with that name has already been defined in file [D:\work\IntelligenceOperations\IntelligenceOperations\tydic_day1\target\classes\com\haust\mapper\BusinessDataRecordMapper.class] and overriding is disabled.
时间: 2023-06-30 13:16:09 浏览: 138
升级SpringCloud到Hoxton.SR3出现The bean ‘xxx.FeignClientSpecification’ could not be registered. 源码分析和解决
这个错误提示是因为在你的项目中存在两个同名的bean,解决方法有两种:
1. 修改其中一个bean的名称,确保两者不同名。
2. 开启bean的覆盖功能,让其中一个bean覆盖另一个bean。可以在Spring配置文件中加入以下配置实现:
```
<bean class="org.springframework.beans.factory.config.BeanDefinitionOverrides">
<property name="beanNameOverrides">
<map>
<entry key="businessDataRecordMapper" value="businessDataRecordMapper1"/>
</map>
</property>
</bean>
```
其中,将`businessDataRecordMapper`重命名为`businessDataRecordMapper1`,这样就不会冲突了。
阅读全文