title: Spring Standard Bean Injection vs. Autowiring
body: <p>As far as I understand When Using Dependency Injection all bean are initializing on Start.   </p>
  
  <pre><code>&lt;bean id="userPreferences" class="com.foo.UserPreferences"&gt;
    &lt;/bean&gt;
    &lt;!-- a singleton-scoped bean injected to the above bean --&gt;
    &lt;bean id="userService" class="com.foo.SimpleUserService"&gt;
  
        &lt;!-- a reference to the userPreferences bean --&gt;
        &lt;property name="userPreferences" ref="userPreferences"/&gt;
    &lt;/bean&gt;
  </code></pre>
  
  <p>and the configuration above means that userService and userPreferences created when application starts. Is it correct?</p>
  
  <p>When using Autowiring and using  <code>&lt;context:component-scan&gt;</code> </p>
  
  <pre><code>public class SimpleUserService{
  
  @Autowired
  UserPreferences userPreferences;
  
  //omitted
  } 
  </code></pre>
  
  <p>1) Is userPreference created on  Application init?</p>
  
  <p>2) What is the default scope for bean injected by autowire and how can we change it? </p>
  
  <p>3) How   affects bean creation and bean injection?</p>
  
  <p>Hope I made myself clear. </p>