Oracle data-source configuration for Spring

前端 未结 4 1612
一向
一向 2020-12-28 17:07

In the Spring framework, how is an Oracle data-source configured?

4条回答
  •  感动是毒
    2020-12-28 17:41

    Note you may want to add to the above that the Oracle driver does not have an open source licence so it will not be in the Maven central repository. You'll have to add it to your local repo.

    To do this: Get the driver you want from: http://www.oracle.com/

    Or you can get it from your oracle installation: {ORACLE_HOME}\jdbc\lib\ojdbc6.jar

    Then run the following maven command:

    mvn install:install-file -Dfile={Path/to/your/ojdbc.jar} -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
    

    This should install it in your local repository so when you reference it as user640378 states above it should work correctly.

提交回复
热议问题