title: Spring @Autowired for setter methods vs non-setter methods
body: <p>According to <a href="https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/beans/factory/annotation/Autowired.html" rel="nofollow noreferrer">@Autowired javadoc</a>:</p>
  
  <blockquote>
    <p>Marks a constructor, field, setter method or config method as to be autowired 
    by Spring's dependency injection facilities. Only one constructor (at
    max) of any given bean class may carry this annotation, indicating the
    constructor to autowire when used as a Spring bean. Such a constructor
    does not have to be public. Fields are injected right after
    construction of a bean, before any config methods are invoked. Such a
    config field does not have to be public. Config methods may have an
    arbitrary name and any number of arguments; each of those arguments
    will be autowired with a matching bean in the Spring container. </p>
    
    <p><strong>Bean property setter methods are effectively just a special case of such a</strong>
    <strong>general config method</strong>. Such config methods do not have to be public.
    In the case of multiple argument methods, the 'required' parameter is
    applicable for all arguments. In case of a Collection or Map
    dependency type, the container will autowire all beans matching the
    declared value type. In case of a Map, the keys must be declared as
    type String and will be resolved to the corresponding bean names. Note
    that actual injection is performed through a BeanPostProcessor which
    in turn means that you cannot use @Autowired to inject references into
    BeanPostProcessor or BeanFactoryPostProcessor types. Please consult
    the javadoc for the AutowiredAnnotationBeanPostProcessor class (which,
    by default, checks for the presence of this annotation).</p>
  </blockquote>
  
  <p>My questions are:</p>
  
  <ol>
  <li><p>What is meant by <strong>config methods</strong>? </p></li>
  <li><p>And also, let's say I have a setter method with <code>@Autowired</code> and some arbitrary methods with <code>@Autowired</code>. I assume that setter method is invoked by spring automatically after the bean instantiation, while random-named <code>@Autowired</code> methods won't be invoked, am I right? </p></li>
  <li><p>Also how does spring understand which <code>@Autowired</code> method should be invoked after the instantiation (setters), while others shouldn't? And how does this correlate with a statement from javadoc, saying that: </p></li>
  </ol>
  
  <blockquote>
    <p>Bean property setter methods are effectively just a special case of
    such a general config method</p>
  </blockquote>
  
  <p>One final question: <strong>where I can read about it?</strong> since spring documentation doesn't have any information on that and I wasn't able to find the exact logic used by spring in its javadoc. </p>