title: Integrate Java selenium with Spring boot
body: <p>In my Java selenium application for running automation testscripts, I want to integrate with Spring/Spring boot to use make use of .properties files for different environment to run.
  Is there any example or how to proceed, I have seen many links , but not able to find the correct way of implementing it.
  Depending on the environment the app is in, it should pick the corresponding .properties file.</p>
  <p>ReadConfigurations.java // Where it should read the properties file and get some values like,</p>
  <pre class="lang-java prettyprint-override"><code>public class ReadConfigurations  {
  //  @Value( &quot;${local.driverpath}&quot; )
  //  private String getdriverpath;
  
  //  @Value( &quot;${login_name}&quot; )
  //    String getLoginName;
  
  }
  </code></pre>
  <p>application-local.properties</p>
  <pre class="lang-properties prettyprint-override"><code>local.driverpath = ..\\chromedriver_win32\\chromedriver.exe
  local.implicit_wait_time=30
  local.app_url = http://localhost:8080/app
  local.login_name= 
  local.login_password = 
  </code></pre>
  <p>application-test.properties</p>
  <pre class="lang-properties prettyprint-override"><code>local.driverpath = ..\\chromedriver_win32\\chromedriver.exe
  local.implicit_wait_time=30
  local.app_url = http://testurl:8080/app
  local.login_name= 
  local.login_password =
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>public class LoginTest {
  ReadConfigurations readConfigurations;
  
      @Test
      private void login() throws  InterruptedException {
              System.setProperty(&quot;webdriver.chrome.driver&quot;, readConfigurations.getDriverPath);
      }
  
  }
  </code></pre>