title: Spring - separate directory for controllers
body: <p>I'm a newbie in Spring and have one question about inserting all controllers in another directory than an executable spring boot file.</p>
  
  <p><a href="http://spring.io/guides/gs/rest-service/" rel="nofollow">This tutorial</a></p>
  
  <p>I have to have <strong>GreetingController.java</strong> and <strong>Application.java</strong> in one directory because if not, then I can't run mvn spring:boot-run</p>
  
  <p>Is there a way to have <strong>Application.java</strong> in <em>/java</em> directory and all controllers in <em>/java/controllers</em>? Can I create some config file to inform <strong>Application.java</strong> where all the files are?</p>
  
  <p>Thank you</p>