Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
package com.example;
 
... // imports

public class MyFatWarInitializer extends FatWarInitializer {


  @Override
  protected Class<? extends FatJarRouter> routerClass() {
    return MyFatJarRouter.class;
  }

}

Blocking main thread

This feature is available starting from the Camel 2.15.2. Camel applications extending FatJarRouter by default block the main thread of the application. It means that after you start your fat jar, your application waits for Ctrl+C signal and doesn't exit immediately. If you would like to achieve similar behavior for non-FatJarRouter applications, retrieve CamelSpringBootApplicationController bean from your ApplicationContext and use the former to block the main thread of your application using CamelSpringBootApplicationController#blockMainThread() method.

...