此内容没有您所选择的语言版本。

7.9. Adding beans and configuration


Overview

Many routing patterns rely on references to Java objects (beans) for configuration or for implementation details. You add the beans into the routing context file using the route editor's Source tab.

Procedure

To add beans to your routing context file:
  1. Open your routing context file in the route editor.
  2. Click the Source tab at the bottom of the route editor's canvas to switch to Source view, so you can edit the XML that defines the route.
  3. Enter the bean elements needed by your route before the camelContext element.
    Note
    Use the id attribute to identify the bean, not the name attribute.
    Important
    Do not edit the contents of the camelContext element. Red Hat JBoss Fuse Tooling overwrites the camelContext element when changes are made to the route diagram in Design view.
  4. Save your changes by selecting File Save on the menu bar.
  5. Click the Design tab at the bottom of the route editor's canvas to return to Design view and the route diagram.

Related topics

Chapter 9, The Source View
Apache Camel Development Guide, Part IV Programming EIP Components
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.