1:去oracle的安装目录下找到驱动jar包,如对应jdk1.6的ojdbc6.jar
2:方便起见,可以把此包复制到你的用户目录下(cmd打开窗口默认就是这个路径)
3: mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc6.jar
4:在pom.xml中加入maven依赖
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.1.0</version>
</dependency>
5:大功告成!