title: @Autowired doesn't work in method parameter
body: <p>Here is my AppConfig:</p>
  
  <pre><code>@Configuration
  @EnableWebMvc
  @ComponentScan
  class AppConfig{
      @Bean("myname")
      fun name(): Name = Name("Quang")
  }
  </code></pre>
  
  <p>Data class:</p>
  
  <pre><code>data class Name(val value: String ="")
  </code></pre>
  
  <p>My Controller Class:</p>
  
  <pre><code>@Controller
  @RequestMapping("/")
  class Main{
      @RequestMapping("/")
      @ResponseBody
      fun index(@Autowired @Qualifier("myname") name: Name): Name {
          //this return ""
          return name
      }
  }
  </code></pre>
  
  <p>The result is "" instead of "Quang".
  But now if I inject it from field like this, it works fine:</p>
  
  <pre><code>@Controller
  @RequestMapping("/")
  class Main{
      @Autowired(required = true)
      @Qualifier("myname")
      lateinit var name:Name
      @RequestMapping("/")
      @ResponseBody
      fun index(): Name {
          //this return "Quang" as expected
          return name
      }
  }
  </code></pre>
  
  <p>So can you explain why @Autowired doesn't works when I use it in method parameter </p>