Created
July 9, 2018 15:36
-
-
Save olegchir/5b2ff83898bc3b5683e97337f0e9bd83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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