title: Spring @Configuration (non-xml configuration) for annotation-driven tasks
body: <p>Can anyone explain how to do achieve a basic configuration of a task using the @Scheduled annotation without any XML configuration? All the examples I can find use at least a minimal XML configuration. For example:</p>
  
  <p><a href="http://blog.springsource.com/2010/01/05/task-scheduling-simplifications-in-spring-3-0/">http://blog.springsource.com/2010/01/05/task-scheduling-simplifications-in-spring-3-0/</a></p>
  
  <p>This uses a typical:</p>
  
  <pre><code>  &lt;context:component-scan base-package="org/springframework/samples/task/basic/annotation"/&gt; 
    &lt;task:annotation-driven/&gt;
  </code></pre>
  
  <p>So I'm just using a @Configuration annotation with a bunch of @Bean annotations. They are all instantiated at startup but the one with the @Scheduled does not run. I've used that annotation successfully in the past when using XML configuration, but never with annotations only. </p>