title: Spring 4 Using @Lazy and @Resource annotations together
body: <p>I would like to lazy load a resource within a lazy loaded configuration class. it seems that it is not currently possible with Spring 4.1.</p>
  
  <pre><code>@Configuration
  @Lazy
  public class ModificationConfiguration {
  
      @Resource(name="modProps")
      @Lazy
      Map&lt;String, String&gt; props;
  
  
      @Bean
      Map&lt;String, String&gt; modProps(){
         ...
      }
  }
  </code></pre>
  
  <p>from the Spring documentation </p>
  
  <blockquote>
    <p>In addition to its role for component initialization, the <code>@Lazy</code> annotation may also be placed on
    injection points marked with <code>@Autowired</code> or <code>@Inject</code>. In this context, it leads to the injection
    of a lazy-resolution proxy.</p>
  </blockquote>
  
  <p>It seems natural to also want this available with <code>@Resource</code> as I can't use <code>@Autowired</code> on a <code>Map&lt;String, String&gt;</code>.  Without the <code>@Lazy</code> being available on <code>@Resource</code> the <code>modProps()</code> bean is created straight away.   </p>
  
  <p>Is there a technical reason why it is not currently possible to do this?</p>