title: How to map nested PlaceHolders of a string to Pojo class in java
body: <p>I am reading data from file and I need to replace the placeholders with the java Bean values.</p>
  
  <p>I have tried the <code>StrSubstitutor</code> to map the values but it did not worked, might me my approach is not right and declaration of placeholders are right please suggest me the right way</p>
  
  <pre><code>Class Test{
      String firstName;
      Request request;
  }
  </code></pre>
  
  <pre><code>class Request {
      String requestNumber;
  }
  </code></pre>
  
  <pre><code>setValues(){
      String template ="Dear ${test.firstname},Your Request number is ${test.request.requestNumber}.";
      Test test= test;
      Map&lt;String, String&gt; valuesMap = new HashMap&lt;&gt;();
      valuesMap.put("test.firstname",test.getFirstName());
      valuesMap.put("test.request.requestNumber",test.getRequest().getRequestNumber());
      StrSubstitutor StrSubstitutor = new StrSubstitutor(valuesMap);
      String mailContent = StrSubstitutor.replace(template );
  }
  </code></pre>
  
  <p><strong>Output should be</strong></p>
  
  <p>Dear firstName,Your Request number is 1234567.</p>