整合druid连接池报错

问题遇到的现象和发生背景

整合druid连接池报错

问题相关代码,请勿粘贴截图
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘dataSource’: Unsatisfied dependency expressed through field ‘basicProperties’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties’: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/jdbc/core/ConnectionCallback

UnsatisfiedDependencyException: Error creating bean with name ‘dataSource’:
依赖问题,看下是否存在依赖冲突或者版本不一致问题。
spring项目:

<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>druid</artifactId>
     <version>1.2.9</version>
</dependency>

springboot项目:

<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>druid-spring-boot-starter</artifactId>
    <version>1.1.14</version>
</dependency>

刷新下依赖试试 NoClassDefFoundError

您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632

如果是Spring整合的druid报错的话,去xml文件中检查数据源是否出错,
如果是SpringBoot 那就去yml文件看是不是配置错了。
检查一下依赖版本,以及完整性。实在不行把依赖删了,重新让Maven下载一份