CamelContext vs ExtendedCamelContext vs SpringCamelContext 有什么区别?

THM*_*THM 6 apache-camel spring-boot

SpringBoot + ApacheCamel 我对 *CamelContext 有问题,但出现异常:

Cannot cast org.apache.camel.spring.SpringCamelContext to org.apache.camel.ExtendedCamelContext
Run Code Online (Sandbox Code Playgroud)

在初始化一些组件时。我的配置部分(pom.xml):

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.2.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>

...

<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-spring-boot-starter</artifactId>
  <version>2.25.2</version>
</dependency>

...
Run Code Online (Sandbox Code Playgroud)

问题:如何使用这些上下文/应该使用哪一个?

  • CamelContext又名DefaultCamelContext
  • ExtendedCamelContext
  • SpringCamelContext