title: Using @Bean and @PostConstruct in Spring config
body: <p>I need to define a class GameUpdateQueueListener as a Spring bean like this, inside a Spring config class:</p>
  
  <pre><code>    @Bean
      GameUpdateQueueListener gameUpdateQueueListener() {
          GameUpdateQueueListener listener = new GameUpdateQueueListener();
          List&lt;EventProcessor&gt; eventProcessors = new ArrayList&lt;&gt;();
          eventProcessors.add(new ContestStartProcessor());
          eventProcessors.add(new ScoreUpdateProcessor());
          eventProcessors.add(new ContestEndProcessor());
          listener.getEventProcessors().addAll(eventProcessors);
          return listener;
      }
  </code></pre>
  
  <p>I need to autowire GameUpdateQueueListener and call a member method of the GameUpdateQueueListener within a @PostConstruct</p>
  
  <pre><code>    @PostConstruct
      public void startGameUpdateQueueListener() {
          listener.queryAndUpdateGame();
      }
  </code></pre>
  
  <p>Shall I define both in the same config or do I need to include them in separate config files?</p>