这是用户在 2024-3-28 22:14 为 https://camel.apache.org/manual/spring.html 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?

Spring 春天

Apache Camel is designed to work first class with Spring in a number of ways, such as:
Apache Camel 与 Spring 的协作方式有很多,它被设计为与 Spring 一起运作

  • Camel runs on Spring Boot with the Camel Spring Boot project
    骆驼在使用 Camel Spring Boot 项目上运行

  • Camel works with Spring XML files (classic Spring XML)
    骆驼与 Spring XML 文件(经典的 Spring XML)一起工作

  • Camel works with Spring dependency injection
    骆驼与 Spring 依赖注入一起工作

  • Camel works with Spring configuration and property placeholders
    骆驼与 Spring 配置和属性占位符一起工作

  • Camel works with Spring transactions
    骆驼与 Spring 事务一起工作

  • Camel works with Spring testing
    骆驼与 Spring 测试一起工作

Using Camel on Spring Boot
在 Spring Boot 上使用 Camel

See the Camel Spring Boot documentation.
查看骆驼 Spring Boot 文档。

Using Camel with Spring XML files
使用 CAMEL 与 Spring XML 文件

Using Camel with Spring XML files, is a classic way, of using XML DSL with Camel. Camel has historically been using Spring XML for a long time. The Spring framework started with XML files as a popular and common configuration for building Spring applications.
使用 Camel 与 Spring XML 文件是一种经典的方式,使用 XML DSL 与 Camel 一起使用。Camel 长期以来一直在使用 Spring XML。Spring 框架最初使用 XML 文件作为构建 Spring 应用程序的流行和常见配置。

To use Camel with Spring XML files see the Spring XML documentation.
要在 Spring XML 文件中使用 Camel,请参阅 Spring XML 文档。

Using Spring dependency injection
使用 Spring 依赖注入

Spring dependency injection is integrated first-class when using Spring and Spring together.
Spring 依赖注入在使用 Spring 和 Spring 一起时是一流集成的。

For example when using Camel on Spring Boot, then you can use any kind of Spring dependency and be able to inject Camel resources such as 'CamelContext', Endpoint and many more.
例如,在使用 Spring Boot 上的 Camel 时,您可以使用任何类型的 Spring 依赖项,并能够注入 Camel 资源,如'CamelContext'、Endpoint 等等。

Using Camel with Spring configuration and property placeholders
使用 Spring 配置和属性占位符与 Camel

See Using Property Placeholder documentation.
请参阅使用属性占位符文档。

Using Camel with Spring transactions
使用 Spring 事务与 Camel

See Transactional Client EIP.
查看事务性客户端 EIP。

Using Camel with Spring testing
使用 Spring 测试中的 Camel

See camel-test-spring-junit5 documentation.
请查看 camel-test-spring-junit5 文档。