简体   繁体   English

Spring 云数据流将 Oracle 驱动程序添加到 CLASSPATH

[英]Spring Cloud Dataflow Add Oracle Driver to CLASSPATH

We have a requirement to create Streams in Spring Cloud Dataflow that retrieve data from an Oracle database.我们需要在 Spring Cloud Dataflow 中创建从 Oracle 数据库中检索数据的流。 However, as documented, Dataflow doesn't come pre-packaged with the Oracle drivers.但是,如文档所述,Dataflow 并未与 Oracle 驱动程序一起预打包。 We're currently deploying the application with a custom Helm chart to Kubernetes.我们目前正在使用自定义 Helm 图表将应用程序部署到 Kubernetes。 We've tried the following:我们尝试了以下方法:

  1. Added the jar to the /lib/ directory将 jar 添加到 /lib/ 目录
  2. Added the jar to another directory and set the CLASSPATH environment variable to ".:/libs/ojdbc10.jar"将 jar 添加到另一个目录并将 CLASSPATH 环境变量设置为“.:/libs/ojdbc10.jar”
  3. Tried to specify the location in the LOADER_PATH variable试图在 LOADER_PATH 变量中指定位置

All the documentation suggests that we more than likely need to roll our own version of Spring Cloud Dataflow.所有文档都表明我们很可能需要推出我们自己的 Spring Cloud Dataflow 版本。 However, if we do that we will lose the ability to utilize the Kubernetes default deployer.但是,如果这样做,我们将失去使用 Kubernetes 默认部署程序的能力。 And my employer is adamantly opposed to doing much development.我的雇主坚决反对进行大量开发。

Is there a way to add the Oracle driver to the classpath WITHOUT rolling our own version of Spring Cloud Dataflow?有没有办法将 Oracle 驱动程序添加到类路径而不滚动我们自己的 Spring Cloud Dataflow 版本? Is there any directory out there that will dynamically add the driver to Spring?是否有任何目录可以将驱动程序动态添加到 Spring?

The most common approach at customers/community is that you pull the GA-released tag from the SCDF repo, add your desired licensed DB driver dependency, and build it for your use.客户/社区最常见的方法是从 SCDF 存储库中提取 GA-released 标签,添加所需的许可 DB 驱动程序依赖项,然后构建它以供您使用。

If that is impossible for your ORG, there's another procedure in our docs — see under Add a JDBC Driver (Optional) section.如果这对您的 ORG 来说是不可能的, 我们的文档中有另一个过程 — 请参阅Add a JDBC Driver (Optional)部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM