title: No qualifying bean of type [java.lang.String] found for dependency when pass parameter to the Bean
body: <p>I am studing Spring and trying to create bean and pass parameter to it.
  My bean in Spring configuration file looks like:</p>
  
  <pre><code>@Bean
  @Scope("prototype")
  public InputFile inputFile (String path)
  {
      InputFile inputFile = new InputFile();
      inputFile.setPath(path);
      return inputFile;
  }
  </code></pre>
  
  <p>InputFile class is:</p>
  
  <pre><code>public class InputFile {
      String path = null;
      public InputFile(String path) {
          this.path = path;
      }
      public InputFile() {
  
      }
      public String getPath() {
         return path;
      }
      public void setPath(String path) {
          this.path = path;
      }
  }
  </code></pre>
  
  <p>and in main method i have:</p>
  
  <pre><code>InputFile inputFile = (InputFile) ctx.getBean("inputFile", "C:\\");
  </code></pre>
  
  <p><code>C:\\</code> - is a parameter which i am trying to pass in.</p>
  
  <p>I run application and receive root exception:</p>
  
  <blockquote>
    <p>Caused by:
    org.springframework.beans.factory.NoSuchBeanDefinitionException: No
    qualifying bean of type [java.lang.String] found for dependency:
    expected at least 1 bean which qualifies as autowire candidate for
    this dependency. Dependency annotations: {}</p>
  </blockquote>
  
  <p>What i did wrong and how to fix it?</p>