微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

DruidDataSource 不能加载jdbc驱动,报Failed to determine a suitable driver class

DruidDataSource  不能加载jdbc驱动,报Failed to determine a suitable driver class

Spring boot 集成 Druid 启动后报Failed to determine a suitable driver class ,不能找到jdbc驱动类.

后来发现,是 spring-boot-starter-parent版本的问题,测试过1.5.9.RELEASE,2.1.3.RELEASE,都不行,后来测试旺度最高的的几个版本,发现2.0.2.RELEASE可以.

    <parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.0.2.RELEASE</version>
	</parent>
<springboot.druid.version>1.1.10</springboot.druid.version>
<druid.version>1.1.10</druid.version>
<!-- 连接池 -->
<dependency>
	<groupId>com.alibaba</groupId>
	<artifactId>druid-spring-boot-starter</artifactId>
	<version>${springboot.druid.version}</version>
</dependency>
dependency>
    <groupId>com.alibaba</groupId>
	<artifactId>druid</artifactId>
	<version>${druid.version}</version>
</dependency>

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐