title: Property @value Spring
body: <p>In spring, we can use <code>@value</code> annotation to refer a property value that is defined in the property file. In this approach, the way it would be something like</p>
  
  <ol>
  <li>To have a separate property file and define the property name and value</li>
  <li>To list this property class path in a spring config file </li>
  <li>Finally referring the value in a class with @value annotations as 
  <code>@value("{key_name}") String abc;</code></li>
  </ol>
  
  <p>Other hand , we can try simply define that property value as a constant in the class something like the below and use it in the class.</p>
  
  <pre><code>public static final String key_name = "1q2w3e";
  </code></pre>
  
  <p>Since we have this simple approach, why we are using <code>@value</code> annotation approach as defined above.</p>
  
  <p>Please help me to understand in detailed about it.</p>