Registered driver with driverClassName=oracle.jdbc.driver.OracleDriver was not found

解决 Registered driver with driverClassName=oracle.jdbc.driver.OracleDriver was not found, trying direct instantiation. 报错


原因:版本不匹配。
Orcale9后的版本把oracle.jdbc.driver.OracleDriver改为oracle.jdbc.OracleDriver。
常用的Oracle6,Oracle8在使用时经常会爆出这个错误。

解决方式: 将 [driver-class-name]由 oracle.jdbc.driver.OracleDriver 改为 oracle.jdbc.OracleDriver

# 解决方式
# 将 [driver-class-name]由 oracle.jdbc.driver.OracleDriver 改为 oracle.jdbc.OracleDriver

spring:
  datasource:
    driver-class-name: oracle.jdbc.OracleDriver
    url: xxx
    username: xxx
    password: xxx

你可能感兴趣的:(oracle,数据库,java)