title: spring boot @Autowired a bean from another module
body: <p>My question is how can i add a package to my list of component to scan @ComponentScan(basePackages = {"io.swagger", "com.company.project", like add it here }),   but this package is in another module in my project,</p>
  
  <p>here is the structure of my project :</p>
  
  <p>springbootProject (maven project)/</p>
  
  <pre><code>  module1(mavenProject, com.company.module1)
         pom1.xml
  
    module2(mavenProject, com.company.module2)
         pom2.xml
  </code></pre>
  
  <p>pom.xml</p>
  
  <p>in module 2 i have my main (@SpringbootAplication) where i want to @Autowired myRepository witch is in module 1</p>
  
  <p>so how can i add the path </p>