title: Loading value from properties file using Spring Expression Language in Mule
body: <p>I have a properties file that contains a path value that I want to load in for use within my program.</p>
  
  <p>I have the following in my XML</p>
  
  <p></p>
  
  <pre><code>&lt;flow doc:name="Flow1" name="Flow1"&gt;
      &lt;http:inbound-endpoint doc:description="This endpoint receives an HTTP message."
          doc:name="HTTP" exchange-pattern="request-response" host="localhost"
          port="8081" contentType="text/html" /&gt;
      &lt;custom-transformer class="com.test.app.mule.ReadFile" doc:name="Java"&gt;
          &lt;spring:property name="path" value="${key.path1}" /&gt;
      &lt;/custom-transformer&gt;
  </code></pre>
  
  <p>and the following in my java code (which loads a file from the specified path from the properties file)</p>
  
  <pre><code>public class ReadFile extends AbstractMessageTransformer {
  
  
      private String path;
  
  
      public String getPath() {
          return path;
      }
  
      public void setPath(String path) {
          this.path = path;
      }
  
      /**
       * loads the content of the file specified in the parameter
       * 
       * @param filename
       *            the name of the file
       * @return the content of the file
       * 
       * 
       */
  
      public String readFile(String filename, String filePath) {
  
          File file1 = new File(path, filePath);
  </code></pre>
  
  <p>This works fine however I am wondering is there any way to modify what I have to allow for the use of the @value annotation </p>
  
  <p><code>private @Value("${key.path1") String path;</code> and get rid of the setters and getters?</p>
  
  <p>Mule doesn't seem to play nice when doing so.</p>