title: How to read data from java properties file using Spring Boot
body: <p>I have a spring boot application and I want to read some variable from my <code>application.properties</code> file. In fact below codes do that. But I think there is a good method for this alternative.</p>
  
  <pre><code>Properties prop = new Properties();
  InputStream input = null;
  
  try {
      input = new FileInputStream("config.properties");
      prop.load(input);
      gMapReportUrl = prop.getProperty("gMapReportUrl");
  } catch (IOException ex) {
      ex.printStackTrace();
  } finally {
      ...
  }
  </code></pre>