欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

springboot错误:Error starting ApplicationContext. To display the conditions report re-run your applica

程序员文章站 2022-07-14 17:06:06
...

springboot错误:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

springboot添加eureka时启动项目出现:



Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-04-30 19:49:32.149 ERROR 2984 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
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				

解决,添加

		<dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.5</version>
        </dependency>
相关标签: springboot