由于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>
即可!!