Because Oracle official authorization is required, ojdbc cannot be downloaded on maven, you need to download it yourself, and then load it into the local maven library through the command, the detailed steps are as follows
1. Go to the official download, address: http://www.oracle.com/technetwork/indexes/downloads/index.html , find "drivers" - "jdbc Drivers", open it, click to agree to the agreement, you can choose the version to download
2. Suppose the downloaded 10.2.0.5.0 is placed in the root directory of the d drive
3. Open the command line window and execute the following command to load it locally
- mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.5.0 -Dpackaging=jar -Dfile=d:\ojdbc12.jar
4. Download the pom file on maven (maven cannot download the jar, but the pom file), and put it into the folder corresponding to the jar in the local lib library
5. Add to the maven file
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc14</artifactId>
- <version>10.2.0.5.0</version>
- </dependency>