擅长:python、mysql、java
<p>终于找到了解决办法</p>
<p>从oracle官方网站下载oracle ojdbc驱动程序。在</p>
<p>将Oracle驱动程序安装/添加到本地maven存储库</p>
<pre><code>mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc7 -Dpackaging=jar -Dversion=12.1.0.1 -Dfile=ojdbc7.jar -DgeneratePom=true
</code></pre>
<p>“-Dfile=”是ojdbc7.jar文件的位置</p>
<p>在pom文件中添加以下依赖项</p>
^{pr2}$
<p>在此之后,它成功地连接到数据库</p>