maven引入oracle驱动

 

下载驱动:

https://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

 

例如我这边是11g, 我下载的是

 

然后将这个jar放到用户的主目录下:

 

 

数据库查询我们oracle对应的版本:

 

 select * from v$version;

 

然后执行命令:

 

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc6.jar

 

然后在项目中引用 :

 

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

 

posted @ 2019-08-20 18:13  护花使者  Views(5668)  Comments(0Edit  收藏  举报