Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Described SpringBoot CamelContext configuration callback.

...

Code Block
languagejava
@Configuration
public class MyAppConfig {

  ...

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

}

Method CamelContextConfiguration#beforeStart(CamelContext) will be call just before the Spring starts the 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:

...