319.7. Spring Cloud
从 Camel 2.19 开始提供
Spring Cloud 组件
Maven 用户需要将以下依赖项添加到其 pom.xml
中,以便使用此组件:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-spring-cloud</artifactId> <version>${camel.version}</version> <!-- use the same version as your Camel core version --> </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-cloud</artifactId>
<version>${camel.version}</version> <!-- use the same version as your Camel core version -->
</dependency>
camel-spring-cloud
jar 附带 spring.factories
文件,因此当您将该依赖项添加到类路径时,Spring Boot 将自动为您配置 Camel。
319.7.1. Camel Spring Cloud Starter 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
从 Camel 2.19 开始提供
要使用启动程序,将以下内容添加到 spring boot pom.xml 文件中:
<dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-spring-cloud-starter</artifactId> <version>${camel.version}</version> <!-- use the same version as your Camel core version --> </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-cloud-starter</artifactId>
<version>${camel.version}</version> <!-- use the same version as your Camel core version -->
</dependency>