springboot 连接oracle 找不到oracle.jdbc.driver.OracleDriver

由于maven仓库中没有oracle.jdbc的poi,所以引入

<!-- https://mvnrepository.com/artifact/com.oracle/ojdbc6 -->
<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc6</artifactId>
    <version>11.2.0.4.0-atlassian-hosted</version>
    <scope>test</scope>
</dependency>

这个是无效,需要将其jar包下载下来,自己添加到本地maven仓库

 下以后,安装格式:

mvn install:install-file    -Dfile=<path-to-file>    -DgroupId=<group-id>     -DartifactId=<artifact-id>    -Dversion=<version>- Dpackaging=<packaging>

样例:mvn install:install-file -DgroupId="com.oracle"  "-DartifactId=ojdbc6"  "-Dversion=12.2.0.4.0" "-Dpackaging=jar" "     -Dfile=D:\program\apache-maven-3.5.3\localRepository\11.2.0.4.0-atlassian-hosted.jar"

Dfile:你本地jar包所在的路径。

安装完毕,项目中引入

		<dependency>
			<groupId>com.oracle</groupId>
			<artifactId>ojdbc6</artifactId>
			<version>12.2.0.4.0</version>
		</dependency>

即可!!

 

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值