title: Spring Boot application listener not called
body: <p>Why is my application listener not called?</p>
  
  <pre><code>@SpringBootApplication
  public class Application
  {
      @Component
      public static class T implements ApplicationListener&lt;ContextRefreshedEvent&gt;
      {
          @Override
          public void onApplicationEvent(ContextRefreshedEvent event)
          {
              System.out.println( "test" );
          }
      }
  
      public static void main(String[] args) throws UnknownHostException
      {
          SpringApplication application = new SpringApplication( Application.class );
          ConfigurableApplicationContext run = application.run( args );
      }
  }
  </code></pre>
  
  <p>I put a breakpoint in that method and it's never reached. I see in the logs:</p>
  
  <blockquote>
    <p>2018-03-30 20:20:57.496  INFO [bootstrap,,,] 84538 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7ce9e05a: startup date [Fri Mar 30 20:20:57 EDT 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@78383390</p>
  </blockquote>