將Oracle JDBC驅動庫安裝到本地倉庫

 

 

一、爲了添加詳細版本信息,先查看當前Oracle數據庫版本數據庫

1 select * from v$version;

查詢返回以下信息oracle

複製代碼
1 BANNER
2 --------------------------------------------------------------------------------
3 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
4 PL/SQL Release 11.2.0.1.0 - Production
5 CORE    11.2.0.1.0    Production
6 TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
7 NLSRTL Version 11.2.0.1.0 - Production
複製代碼

 

二、安裝JAR包post

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc5 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=%ORACLE_HOME%/jdbc/lib/ojdbc5.jar
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=%ORACLE_HOME%/jdbc/lib/ojdbc6.jar

 

三、如今本地倉庫中就有了Oracle JDBC包,使用時,在pom.xml 文件中添加以下配置spa

1 <dependency>
2     <groupId>com.oracle</groupId>
3     <artifactId>ojdbc6</artifactId>
4     <version>11.2.0.1.0</version>
5 </dependency>
相關文章
相關標籤/搜索