将Oracle JDBC驱动库安装到本地仓库
1、为了添加详细版本信息,先查看当前Oracle数据库版本
select * from v$version;
查询返回如下信息
BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production PL/SQL Release 11.2.0.1.0 - Production CORE 11.2.0.1.0 Production TNS for 32-bit Windows: Version 11.2.0.1.0 - Production NLSRTL Version 11.2.0.1.0 - Production
2、安装JAR包
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
3、现在本地仓库中就有了Oracle JDBC包,使用时,在pom.xml 文件中添加如下配置
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.1.0</version>
</dependency>
-----------------------------------------------------------------------------------------------------------
薔薇猛虎皆成個性,陽光雨露俱是天恩!
薔薇猛虎皆成個性,陽光雨露俱是天恩!
浙公网安备 33010602011771号