Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: CamelContextConfiguration#beforeStart => CamelContextConfiguration#beforeApplicationStart

...

Code Block
languagejava
@Configuration
public class MyAppConfig {

  ...

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

}

Method CamelContextConfiguration#beforeStartbeforeApplicationStart(CamelContext) will be call called just before the Spring starts the autocontext is started, so the CamelContext instance passed to this callback is fully auto-configured CamelContext .

Disabling JMX

To disable JMX of the auto-configured CamelContext use camel.springboot.jmxEnabled property (JMX is enabled by default). For example you could add the following property to your application.properties file:

...