@Test
 public void testDefaultBanner() throws Exception {
   SpringApplication application = new SpringApplication(Config.class);
   application.setWebEnvironment(false);
   this.context = application.run();
   assertThat(this.out.toString(), containsString(":: Spring Boot ::"));
 }
 @Test
 public void testCustomBanner() throws Exception {
   SpringApplication application = new SpringApplication(Config.class);
   application.setWebEnvironment(false);
   application.setBanner(new DummyBanner());
   this.context = application.run();
   assertThat(this.out.toString(), containsString("My Banner"));
 }
Exemple #3
0
 public static void main(String[] args) throws Exception {
   SpringApplication.run(Example.class, args);
 }
 public static void main(String[] args) throws Exception {
   SpringApplication.run(MainController.class, args);
 }