title: Spring Boot - Externalize Database Settings
body: <p>I have a JAVA project developed with Spring Boot.</p>
  
  <p>The database settings are in the default resources/application.properties file.</p>
  
  <pre><code>spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
  spring.datasource.driver-class-oracle.jdbc.driver.OracleDriver
  spring.datasource.url=jdbc:oracle:thin:@//172.********:1521/BDHML
  spring.datasource.username=********
  spring.datasource.password=********
  </code></pre>
  
  <p>The application will run through the command:</p>
  
  <pre><code>java -jar **CONFIGURAÇÃO** app-cosolidar.jar
  </code></pre>
  
  <p>I need to put the database settings in a .properties file external to the project.</p>
  
  <p>How can I do this?</p>
  
  <p>What should the .properties file look like?</p>
  
  <p>Should I change any .java files?</p>
  
  <p>What setting should I put in java -jar?</p>
  
  <p>Regards, Diego</p>