title: Spring: @Value vs. @Autowired
body: <p>I'm having some issues with injection in the application I'm working on (using Spring Version 3.1.2). To start with, I'm seeing a lot of code like this:</p>
  
  <pre><code>@Value("#{searchRequestBean}")
  private SearchRequest searchRequest;
  
  @Value("#{searchResponseBean}")
  private SearchResponse searchResponse;
  
  @Autowired
  private SavedSearchService service;
  </code></pre>
  
  <p>Each of these three appears to have the effect of autowiring the specified bean/service into the class. What I don't understand is, what's the difference between <code>@Value</code> and <code>@Autowired</code> in these cases? Every example I find online seems to use <code>@Value</code> to inject values from a properties file. In this case, <code>SearchResponse</code> and <code>SearchRequest</code> are abstract classes.</p>
  
  <p>I'm hoping that a better understanding of this will help me solve some issues I'm having with my Session bean.</p>