首页 > 解决方案 > org.springframework.beans.factory.UnsatisfiedDependencyException:找不到oracle驱动程序

问题描述

我正在使用SPRING BOOT ORACLE JPA一个GRADLE简单的项目,但在运行时我得到:

org.springframework.beans.factory.UnsatisfiedDependencyException:创建名为“org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration”的bean时出错:通过构造函数参数0表示的依赖关系不满足;嵌套异常是 org.springframework.beans.factory.BeanCreationException:在类路径资源 [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class] 中定义名称为“dataSource”的 bean 创建时出错:通过工厂方法进行 Bean 实例化失败; 嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 [com.zaxxer.hikari.HikariDataSource]:工厂方法 'dataSource' 抛出异常;嵌套异常是 java.lang.IllegalStateException:无法加载驱动程序类:oracle.jdbc.driver.OracleDriver

我的 application.properties 是:

server.port=8082 # create n drop tables, loads import.sql 
spring.jpa.hibernate.ddl-auto=create-drop 
spring.datasource.url=jdbc:oracle:thin:@//138.69.14.63:1521/drbadev 
spring.datasource.username=$$$$$$$$$$ spring.datasource.password=$$$$$$ 
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver

我能做些什么来解决这个问题?

标签: oraclespring-bootjpagradle

解决方案


推荐阅读