title: Inject Dynamic Values for the property in Spring
body: <p>I am very new to Spring and while going through the DI topic through various sources (Book &amp; Internet) I have seen the following pattern of defining bean configuration:</p>
  
  <p>For example we have a class "SampleApp"</p>
  
  <pre><code>public class SampleApp
  {
      private int intValue;
      private float floatValue;
  
      public SampleApp(int value)
      {
        intValue = value;
      }
  
      public void setIntValue(int value)
      {
        intValue = value;
      }
  
      public void setFloatValue(float floatValue)
      {
        this.floatValue = floatValue;
      }
  }
  </code></pre>
  
  <p>Corresponding bean configuration is as follows:</p>
  
  <pre><code> &lt;bean class="somepackage.SampleApp" id="samplebeanapp"&gt;
      &lt;constructor-arg value="15" /&gt;
      &lt;property value="0.5" name="floatValue"&gt;&lt;/property&gt;
   &lt;/bean&gt;
  </code></pre>
  
  <p>We have been hard-coding the value here to 15 &amp; 0.5.
  Here are my questions :</p>
  
  <ul>
  <li>Is it possible to pass those values as run time parameter with scope as prototype? </li>
  <li>If yes, how can we do it? and please elaborate with some example.</li>
  </ul>