oracle - 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
我能做些什么来解决这个问题?
解决方案
推荐阅读
- excel - 如何通过循环使用 VBA 在多个单元格(行和列)上实现 SumIfs?
- javascript - 有没有办法发送一个静态图像,它是一个在正文中的 png 用于 axios 帖子的反应?
- php - 如何作曲家安装最新的require-dev和最低的require
- html - CSS 样式以正确对齐 img 我希望它们在我的页面上的方式?
- ios - 如何使用 Alamofire.request() 将 XML 肥皂响应保存到文件?
- php - 我可以在表单中允许一个空的日期字段吗?
- http - Flutter:编辑配置文件返回 401 'Unauthenticated' 但在 POSTMAN 中工作
- hibernate - 用 new 和 Distinct 一起查询
- java - 带参数调用main方法时出错
- python - Pythonic 方法来计算字典中的空列表和非空列表