6.6. カスタムの Camel コンテキスト設定


Camel 自動設定によって作成された CamelContext Bean で操作を実行する場合は、以下のように、Spring コンテキストに CamelContextConfiguration インスタンスを登録する必要があります。

@Configuration
public class MyAppConfig {

  ...

  @Bean
  CamelContextConfiguration contextConfiguration() {
    return new CamelContextConfiguration() {
      @Override
      void beforeApplicationStart(CamelContext context) {
        // your custom configuration goes here
      }
    };
  }

}
注記

Spring コンテキストの開始前にメソッド CamelContextConfiguration および beforeApplicationStart(CamelContext) が呼び出され、このコールバックに渡された CamelContext インスタンスは完全に自動設定されます。複数のインスタンスの CamelContextConfiguration を Spring コンテキストに追加でき、すべてが実行されます。

Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る