title: Which annotation to inject list value to list property?
body: <p>I'm upgrading my app from spring 3.x to 4.3. I'm removing xml configuration and using annotation for it. I'm getting following exception:</p>
  
  <pre><code>Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanInitializationException: Properties 'authorities' and 'username' are required for bean 'getJobUsingQuartz'
  </code></pre>
  
  <p>What is annotation for following xml code:</p>
  
  <pre><code>&lt;bean id="mcn" 
     class="quartzJobs.jobs.MyClassName"&gt;
      &lt;property name="username" value="CronUser"/&gt;
      &lt;property name="authorities"&gt;
          &lt;list&gt;
              &lt;value&gt;ROLE_SYSTEM&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
   &lt;/bean&gt;
  </code></pre>
  
  <p>I want to inject above value to property using annotation. I'm trying like following:</p>
  
  <p>MyClassName.java</p>
  
  <pre><code>@Configuration
  @ComponentScan(basePackages = "quartzJobs.jobs")
  public class MyClassName{
     @Autowired
          @Value("CronUser")
          private String username;
  
          @Autowired
          @Value(value = "{ROLE_SYSTEM}")
          private List&lt;String&gt; authorities;
  
          @Required
          public
          void setUsername(final String aUsername)
          {
               username = aUsername;
          }
  
          @Required
          public
          void setAuthorities(final List&lt;String&gt; aAuthorities)
          {
              authorities = aAuthorities;
          }
        }
  </code></pre>
  
  <p>What I'm doing wrong? please help me.</p>