title: How SpringBoot dependency injection works with different type of annotations
body: <p>I recently started exploring <code>Spring Boot</code>. I see that there are 2 ways to define <code>Beans</code> in <code>Spring Boot</code>. </p>
  
  <ol>
  <li>Define <code>@Bean</code> in the class annotated with <code>@SprinBootApplication</code> </li>
  <li>Define <code>@Bean</code> in a class annotated with <code>@Configuration</code> </li>
  </ol>
  
  <p>I am also confused about <code>stereo-type annotation</code> <code>@Repository</code>  <code>@Service</code> <code>@Controller</code> etc.</p>
  
  <p>Can someone please explain how dependency-injection works with these annotations?</p>