A bean with that name has already been defined in DataSourceConfiguration$Hikari.class

构建springcloud的时候一定要注意起微服务的版本 不然会报上面的错误

原因:
SpringBoot和SpringCloud的版本不兼容造成。
这里因为SpringBoot想尝鲜使用了2.1.0,而SpringCloud仍然用的是Finchley.SR2,而它支持的是2.0.x及以下版本。
对应的版本应该使用Greenwich.M1。
Issues回答:

解决:
降SpringBoot版本或者使用Greenwich.M1。
所以还是建议直接在start.spring.io上构建新项目,或者在idea上构建项目的时候选择Spring Initializr来避免版本不兼容。
---------------------
作者:Orcas阿晨
来源:CSDN
原文:https://blog.csdn.net/u012211603/article/details/83714285
版权声明:本文为博主原创文章,转载请附上博文链接!

A bean with that name has already been defined in DataSourceConfiguration$Hikari.class的更多相关文章

  1. springboot 解决 The bean 'userRepository', defined in null, could not be registered. A bean with that name has already been defined in file XXX and overriding is disabled.

    1.springboot 启动时报错: 2019-02-20 14:59:58.226 INFO 10092 --- [ main] c.f.s.SpringbootssmApplication : ...

  2. A bean with that name has already been defined in class path resource [org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.class] and overriding is disabled

    2019-12-19 13:26:17.594 WARN [main] o.s.boot.web.servlet.context.AnnotationConfigServletWebServerApp ...

  3. Feign 报错:The bean 'service-producer.FeignClientSpecification', defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.

    报错: 2019-09-17 20:34:47.635 ERROR 59509 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ******* ...

  4. SpringBoot启动报错:ould not be registered. A bean with that name has already been defined in file and overriding is disabled.

    SpringBoot启动报错 ***************************APPLICATION FAILED TO START*************************** Des ...

  5. 【SpringBoot系列4】SpringBoot定制自己的bean

    起因:SpringBoot我是越用越喜欢,但当SpringBoot出了问题的时候,我却无从下手,因为封装实在是太高度化了.然后之前有一个需求,使用SpringBoot提供的StringRedisTem ...

  6. bean的singleton(没有看到生命周期范围??)

    4.5.1 The singleton scope Only one shared instance of a singleton bean is managed, and all requests ...

  7. Spring Bean Life Cycle Methods – InitializingBean, DisposableBean, @PostConstruct, @PreDestroy and *Aware interfaces

    Spring Beans are the most important part of any Spring application. Spring ApplicationContext is res ...

  8. 【Feign】@FeignClient相同名字错误 The bean 'xxx.FeignClientSpecification', defined in null, could not be registered

    The bean 'xxx.FeignClientSpecification', defined in null, could not be registered. A bean with that ...

  9. springboot easypoi 报错The bean 'beanNameViewResolver', defined in class path resource [cn/afterturn/e

    事故现场: The bean 'beanNameViewResolver', defined in class path resource [cn/afterturn/easypoi/configur ...

随机推荐

  1. SpringBoot的学习【3.HelloWorld配置细节】

    /** * @SpringBootApplication用来标注主程序类. */ @SpringBootApplication public class First { public static v ...

  2. ArcGIS 按多边形区域统计栅格影像的一些信息

    在使用ArcGIS对栅格影像进行分析时,难免要进行一些统计类的分析.如统计框选区域的像素的个数,面积.均值等内容. 下面给出使用“Spatial Analyst Tools -- > Zonal ...

  3. Java错误:结束的字符文字

    编译器为NetBeans 在学习java的时候突然出现了以下错误 错误代码是: Gen <Integer ,String> a = new Gen <Integer, String& ...

  4. 关于CMD的一些小技巧

    1.cd命令无法切换路径怎么办? a)切换盘符不好使

  5. 利用Aspectj实现Oval的自动参数校验

    前言: Oval参数校验框架确实小巧而强大, 他通过注解的方式配置类属性, 然后通过Oval本身自带的工具类, 快速便捷执行参数校验. 但是工具类的校验需要额外的代码编写, 同时Oval对函数参数级的 ...

  6. python select解析 socket高效通信服务器 自己写的socketserver

    import select import socket import queue server = socket.socket()#创建服务器端 server.bind(('localhost',99 ...

  7. python 进程池的使用和坑

    from multiprocessing import Pool,Process import time,os def Foo(a):#创建函数 time.sleep(2) print('in the ...

  8. LG1912 [NOI2009]诗人小G

    题意 题目描述 小G是一个出色的诗人,经常作诗自娱自乐.但是,他一直被一件事情所困扰,那就是诗的排版问题. 一首诗包含了若干个句子,对于一些连续的短句,可以将它们用空格隔开并放在一行中,注意一行中可以 ...

  9. 【SpringBoot】服务器端主动推送SSE技术讲解

    =====================16.高级篇幅之SpringBoot2.0服务器端主动推送SSE技术讲解 ============================ 1.服务端推送常用技术介绍 ...

  10. 基于redis的 分布式锁 Java实现

    package com.hs.services.lock; import java.util.concurrent.TimeUnit; import javax.annotation.Resource ...