title: @autowired on method in Spring
body: <p>I am learning Spring, and as far as I understand, when we use @annotation on a method which has a generic name (not a setter method), then the method's arguments are autowired.</p>
  
  <pre><code>public class MovieRecommender {
  
      private MovieCatalog movieCatalog;
  
      private CustomerPreferenceDao customerPreferenceDao;
  
      @Autowired
      public void prepare(MovieCatalog mC,
              CustomerPreferenceDao cPD) {
          this.movieCatalog = mC;
          this.customerPreferenceDao = cPD;
      }
  
      // ...
  
  }
  </code></pre>
  
  <p>So, here, the fields <strong>movieCatalog</strong> and <strong>customerPreferenceDao</strong> are autowired with the values of <strong>mC</strong> and <strong>cPD</strong>. What I fail to understand is how is this different from the same method without the "<strong>@autowired</strong>".</p>
  
  <p>I understand @autowired when applied to a Field name, but not able to understand when the values are explicitly being passed to the method (either a setter or any other method), then what does Spring do special?</p>