第 61 章 Spring JDBC
从 Camel 3.10 开始
仅支持生成者
Spring JDBC 组件是 JDBC 组件的扩展,它具有一个额外的功能,可与 Spring Transaction Manager 集成。
有关此组件的常规使用,请查看 JDBC 组件。
Maven 用户必须在其 pom.xml
中为这个组件添加以下依赖项:
<dependency> <groupId>org.apache.camel.springboot</groupId> <artifactId>camel-spring-jdbc-starter</artifactId> </dependency>
版本使用 BOM 以下列方式指定:
<dependencyManagement> <dependencies> <dependency> <groupId>com.redhat.camel.springboot.platform</groupId> <artifactId>camel-spring-boot-bom</artifactId> <version>${camel-spring-boot-version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
61.1. 配置选项
Camel 组件在两个独立级别上配置:
- 组件级别
- 端点级别
<dependencyManagement> <dependencies> <dependency> <groupId>com.redhat.camel.springboot.platform</groupId> <artifactId>camel-spring-boot-bom</artifactId> <version>${camel-spring-boot-version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>