【Bug】SpringBoot解決The bean 'dataSource', defined in BeanDefinition defined in class path resource問題

The bean ‘dataSource’, defined in BeanDefinition defined in class path resource
***************************
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

原因

SpringBoot 和 SpringCloud 版本不兼容造成!!!!

解決方法

在application.yml添加命令,重啓

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章