经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » Java相关 » Java » 查看文章
spring2.0 Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definiti
来源:cnblogs  作者:永不飞xiang  时间:2019/4/29 9:14:15  对本文有异议

1. 报错信息

Description:

The bean 'dataSource', defined in BeanDefinition defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

 

 

 

 main:
    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册

 

原文链接:http://www.cnblogs.com/wuxiang12580/p/10784904.html

 友情链接: NPS