Skip to content

Instantly share code, notes, and snippets.

@olegchir
Created July 9, 2018 15:36
Show Gist options
  • Save olegchir/5b2ff83898bc3b5683e97337f0e9bd83 to your computer and use it in GitHub Desktop.
Save olegchir/5b2ff83898bc3b5683e97337f0e9bd83 to your computer and use it in GitHub Desktop.
@SpringBootApplication
@EnableTask
public class SampleTask {
@Bean
public CommandLineRunner commandLineRunner() {
return new HelloWorldCommandLineRunner();
}
public static void main(String[] args) {
SpringApplication.run(SampleTask.class, args);
}
public static class HelloWorldCommandLineRunner implements CommandLineRunner {
@Override
public void run(String... strings) throws Exception {
System.out.println("Hello, World!");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment