7.5. Spring Boot의 Camel 컨텍스트 자동 구성 정보

Camel Spring Boot 자동 구성에서는 CamelContext 인스턴스를 제공하고 SpringCamelContext 를 생성합니다. 또한 해당 컨텍스트의 종료를 초기화하고 수행합니다. 이 Camel 컨텍스트는 camelContext 8080 이름 아래에 Spring 애플리케이션 컨텍스트에 등록되며 다른 Spring 8080과 마찬가지로 액세스할 수 있습니다. 아래 표시된 대로 camelContext 에 액세스할 수 있습니다.

예제

@Configuration
public class MyAppConfig {

  @Autowired
  CamelContext camelContext;

  @Bean
  MyService myService() {
    return new DefaultMyService(camelContext);
  }

}