title: Property file in spring mvc
body: <p>I have a property file with key value pairs:</p>
  
  <pre><code>key1=value1
  key2=value2
  </code></pre>
  
  <p>Now, in my controller, I want to directly print the value of a property file (of course after loading the property file using web.xml / app-servlet.xml), like:</p>
  
  <pre><code>System.out.printl(${key1});
  </code></pre>
  
  <p>Is it possible to do that?</p>
  
  <p>If not, I want to create an interface with all constant variable to read values from property file. How do I do it??</p>
  
  <pre><code>public interface MyConstants
  {
        @Value("${key1}")
        public static final KEY_1="";
  }
  </code></pre>
  
  <p>But as expected only empty string is assigned. </p>
  
  <p>How do I solve this issue? Or, what is the best way to using property files to retrieve values? Thanks in advance...</p>