Annotation Interface EnableTaskLauncher


@Target(TYPE) @Retention(RUNTIME) @Documented @Inherited @Import(TaskLauncherSink.class) public @interface EnableTaskLauncher

Enable this boot app to be a sink to receive a TaskLaunchRequest and use the TaskLauncher to launch the task.

 @Configuration
 @EnableTaskLauncher
 public class AppConfig {

        @Bean
        public MyCommandLineRunner myCommandLineRunner() {
                return new MyCommandLineRunner()
    }
 }
 
Note that only one of your configuration classes needs to have the @EnableTaskLauncher annotation.
Author:
Glenn Renfro