code: public String resolve(String expression) {
      if (isEmpty(expression)) {
        return expression;
      }
      
      // Check if the expression is already been parsed
      if (cache.containsKey(expression)) {
        return cache.get(expression);
  
      }
  
      // If the expression does not start with $, then no need to do PATTERN
      if (!expression.startsWith("$")) {
  
        // Add to the mapping with key and value as expression
        cache.put(expression, expression);
  
        // If no match, then return the expression as it is
        return expression;
  
      }
  
      // Create the matcher
      Matcher matcher = PATTERN.matcher(expression);
  
      // If the matching is there, then add it to the map and return the value
      if (matcher.find()) {
  
        // Store the value
        String key = matcher.group(1);
  
        // Get the value
        String value = environment.getProperty(key);
  
        // Store the value in the setting
        if (value != null) {
  
          // Store in the map
          cache.put(expression, value);
  
          // return the value
          return value;
  
        }
  
      }
  
      // Add to the mapping with key and value as expression
      cache.put(expression, expression);
  
      // If no match, then return the expression as it is
      return expression;
    }
docs: Thanks to http://stackoverflow.com/a/37962230/19219