使用springBoot整合springCloud的过程中出现了这个问题
***************************
APPLICATION FAILED TO START
***************************
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
Process finished with exit code 1
出现这个问题的原因是:
SpringBoot和SpringCloud的版本不兼容造成。
解决:
我的springboot使用了2.1.15.RELEASE 然而springcloud 使用了Finchley.SR2 我将springBoot版本降下来,降到2.0.7.RELEASE 解决