title: How to load nested key value pairs from a properties file in SpringBoot
body: <p>Is there a better manner to implement properties file having key-value pairs as value using Spring/Spring Boot?
  I want to create a property file where the key contains a couple of key-value pair as value.</p>
  
  <p>I tried below implementation:- </p>
  
  <p>Properties file:-</p>
  
  <pre><code>Fiat=model:pet,year:1996
  Honda=model:dis,year:2000
  </code></pre>
  
  <p>And i have below class trying to read the properties file. </p>
  
  <pre><code>@Component
  @PropertySources(@PropertySource("classpath:sample.properties"))
  public class PropertiesExtractor {
  
      @Autowired
      private Environment env;
  
      public String pullValue(String node) {
  
      String value = env.getProperty(node);
      System.out.println(value);//for Fiat, i get syso as **model:pet,year:1996**
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I need to parse the values using java, to get the individual value. Is this the only way out to implement this. </p>
  
  <p>Is there a better way to use nested property files in Java?</p>