title: Spring autowiring bean with mixed constructor
body: <p>I have two beans like this:</p>
  
  <pre><code>@Component
  @Scope("prototype")
  class A {
      A(int number, B anotherBean) {
           //...
      }
  }
  
  @Component
  class B {
       //..
  }
  </code></pre>
  
  <p>How can I build A and have B autowired? If I use new I won't get anotherBean's value, if I use autowiring I won't get number's value. </p>
  
  <p><strong>Edit:</strong> The number is calculated at runtime, so I can't use @Value like answers suggested.</p>