title: Spring application does not start outside of a package
body: <p>I am following <a href="https://spring.io/guides/gs/scheduling-tasks/" rel="noreferrer">this</a> tutorial to build a basic application with Spring. It is working flawlessly as long as I follow this sub-directory structure:</p>
  
  <pre><code>└── src
      └── main
          └── java
              └── hello
  </code></pre>
  
  <p>If I move my <code>Application.java</code> and <code>ScheduledTasks.java</code> classes out of the hello package I get the following error:</p>
  
  <pre><code>** WARNING ** : Your ApplicationContext is unlikely to start due to a `@ComponentScan` of the default package.
  </code></pre>
  
  <p>And a few seconds later, indeed...</p>
  
  <pre><code>java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.context.annotation.AnnotationConfigApplicationContext@71fa8894: startup date [Wed Jan 18 22:19:12 CET 2017]; root of context hierarchy
  </code></pre>
  
  <p>My question is, why do I need to put my classes into a package? What use does it have? How can I avoid this error? Do I really need to use packages if it is a really simple application?</p>