无法在Spring Cloud Data Flow中为Oracle添加JDBC驱动程序

问题描述

在阅读https://docs.spring.io/spring-cloud-dataflow/docs/current-SNAPSHOT/reference/htmlsingle/#_oracle上的官方文档之后,仍然不清楚依赖项进入哪个pom.xml以及将oracle jar文件放入本地Spring Cloud数据流服务器2.6.0的位置。

流定义

   time --trigger.time-unit=SECONDS | httpclient --httpclient.url='******' | jdbc --spring.datas 
   ource.driver-class-name=oracle.jdbc.OracleDriver --spring.datasource.username='******' -- 
   spring.datasource.schema=ParaDYMEADMIN --spring.datasource.url='******' -- 
   spring.datasource.password='******'

在部署过程中,这是错误org.springframework.boot.context.properties.source.InvalidConfigurationPropertyValueException: Property spring.datasource.schema with value 'ServletContext resource [/ParaDYMEADMIN]' is invalid: The specified resource does not exist.

解决方法

检出示例here,这些示例可帮助您了解如何通过更改JDBC驱动程序来构建自定义SCDF服务器。

,

您需要在类路径中使用JDBC驱动程序。确保在pom.xml中提供以下Maven坐标。

<dependencies>
  <dependency>
    <groupId>com.oracle.database.jdbc<groupId>
    <artifactId>ojdbc8-production</artifactId>
    <version>19.7.0.0</version>
    <type>pom</type>
  </dependency>
</dependencies>