SpringBoot EventListener don't receive events
<p>my <code>EventListener</code> annotation don't receive any Spring Event. Here is my code:</p>

<pre><code>@Component
public class ProxyConfig {

    public ProxyConfig() {
        System.out.println("I can see this in the console");
    }

    @EventListener
    public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
        System.out.println("WON'T WORK :-(");  // FIXME
    }

    @EventListener
    public void test(ApplicationStartedEvent event) {
        System.out.println("WON'T WORK :-(");  // FIXME
    }
}
</code></pre>

<p>And here is my <code>Application</code> class:</p>

<pre><code>@SpringBootApplication
public class Application {
    public static void main(String[] args) throws Exception {
        SpringApplication.run(MyApp.class, args);
    }
}
</code></pre>

<p>According to <a href="https://spring.io/blog/2015/02/11/better-application-events-in-spring-framework-4-2" rel="noreferrer">https://spring.io/blog/2015/02/11/better-application-events-in-spring-framework-4-2</a> and <a href="https://solidsoft.wordpress.com/2015/09/29/annotation-driven-event-listeners-in-spring-4-2/" rel="noreferrer">https://solidsoft.wordpress.com/2015/09/29/annotation-driven-event-listeners-in-spring-4-2/</a> it must be working, but it still not print my "WON'T WORK :-(" String :(</p>

<p>Any idea?</p>

<p>Thanks!</p>