Spring Boot

@SpringBootApplication
public class SpringBootBasicApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(SpringBootBasicApplication.class, args);
    }
    
    @Override
    public void run(String... args) throws Exception {
        System.out.println("Hello Spring Boot.");       
    }
}


@Component
public class SpringApplicationBuilder implements CommandLineRunner {

    public static void main(String[] args) {
        new SpringApplicationBuilder(MyRunnerClass.class).
            bannerMode(Banner.Mode.CONSOLE).
            sources(SpringConfiguration.class).
            // if spring boot web starter is included and no embedded tomcat is wanted
//          web(WebApplicationType.NONE).
            run(args);
        
        }