59.13. 自动配置的 OSGi 集成
可从 Camel 2.17 开始
Camel 上下文 Bean 由 Camel CDI 自动适应,以便它们注册为 OSGi 服务,以及各种解析器(如 ComponentResolver
和 DataFormatResolver
)与 OSGi 注册表集成。这意味着 Karaf Camel 命令可用于运行由 Camel CDI 自动配置的 Camel 上下文,例如:
karaf@root()> camel:context-list Context Status Total # Failed # Inflight # Uptime ------- ------ ------- -------- ---------- ------ camel-cdi Started 1 0 0 1 minute
karaf@root()> camel:context-list
Context Status Total # Failed # Inflight # Uptime
------- ------ ------- -------- ---------- ------
camel-cdi Started 1 0 0 1 minute
如需 Camel CDI OSGi 集成的示例,请参见 camel-example-osgi
示例。