title: Using @Value annotation with Spring and SPeL
body: <p>I am trying to find a way to do the following in my spring boot 1.5 application.</p>
  
  <ol>
  <li><p>I have a variable who's value is dynamic meaning it comes in from an external system.</p>
  
  <p><code>String name = "abc"; //gets set externally</code></p></li>
  <li><p>I want to try and use the name's value to lookup my property file and see if there is a matching property defined. something like..</p>
  
  <p><code>@Value("#{myClassName.name.concat('something')}")
  String propertyValue;</code></p></li>
  </ol>
  
  <p>Now my application.property file has the following property set
  assume name has the value "abc"</p>
  
  <h2>property file contents:</h2>
  
  <pre><code>abc.something:abcValue
  </code></pre>
  
  <p>Now, when i try to access the value of the variable <code>propertyValue</code> it gets set to the value <code>abc.something</code> and not <code>abcValue</code>.</p>
  
  <p>I probably think I cannot use <code>@Value</code> with <code>#{}</code> to get to that, I was wondering if there was a way to to use <code>#{}</code> inside <code>${}</code> so that I goes and fetches the property value after calculating the name of the property using <code>#{}</code>.</p>
  
  <p>Let me know if you need more details please.</p>