title: @SpringBootApplication in same package?
body: <p>I wrote an app based on Spring Boot, but it works when i put all class (model , contoller that annotated with @restController) in the same package of where SpringBoot exist .
  My question is why these classes must be in the same package ?</p>
  
  <p>this is the Spring Boot App annotated :</p>
  
  <pre><code>@SpringBootApplication    
  public class Application {
     public static void main(String[] args) {
           SpringApplication.run(Application.class, args);
        } }
  </code></pre>
  
  <p>This is the rest controller :</p>
  
  <pre><code>@RestController
  public class PersonController {
  
      @RequestMapping("/Hello")
      public String syaHello(@RequestParam(value = "name", defaultValue = "World") String name) {
          return "Hello " + name;
      } }
  </code></pre>