Several issues connected with Maven Oracle11g database as SSM project

1. Oracle11g introduced in the corresponding coordinates Maven

As the official oracle is not authorized, it can not directly download the maven ojdbc, needs its own download and then loaded into the local maven repository by command

step:

1. Locate the drive corresponding to the Oracle database in the installation directory of our Oracle database (such as this blogger is: D: \ Oracle \ app \ oracle \ product \ 11.2.0 \ server \ jdbc \ lib)

2. Open a command line window (as an administrator to open, and make sure maven configured environment variables), where the first step to jump to drive directory execute the following command to load the jar package to the local repository

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc6.jar

Success Figure:

3. introducing the coordinates maven

2. Configure load the database Four Elements

When connecting to the database, we often need to configure the four properties

This is the final of this blogger is configured correctly

Here there are several places to note:

One final example url, XE some time, when some orcl ; this depends on the default configuration installed oracle database, you can view the tnsnames.ora in the installation directory (such as this blogger is: D: \ Oracle \ app \ oracle \ product \ 11.2.0 \ server \ network \ ADMIN \ tnsnames.ora)

Second, do not leak! @Localhost of course, you can use the @ 127.0.0.1 (this blogger because of a leak check @ nearly half an hour in the end what was wrong ... ooo, ooo)

Third, the account password, can be used to determine the corresponding account password oracle database (for example, you can use the corresponding graphical software PLSQL landing to try)

Published 95 original articles · won praise 43 · views 70000 +

Guess you like

Origin blog.csdn.net/lyxuefeng/article/details/102921424