title: What do the following Spring datasource properties mean?
body: <p>I have come across some datasource properties for Spring Boot, that are specified in the application.properties. I am having a hard time understanding the purpose of the datasource properties. 
  Also, I am not able to find the explanation of these properties here for datasource - <a href="https://docs.spring.io/spring-boot/docs/1.1.2.RELEASE/reference/html/common-application-properties.html" rel="nofollow noreferrer">https://docs.spring.io/spring-boot/docs/1.1.2.RELEASE/reference/html/common-application-properties.html</a> and I am using Spring Boot version 1.</p>
  
  <pre><code>spring.datasource.test-while-idle=true
  spring.datasource.initial-size=10
  spring.datasource.min-idle=10
  spring.datasource.time-between-eviction-runs-millis=300000 
  spring.datasource.validation-query=SELECT 1 from DUAL
  spring.datasource.test-on-borrow=true
  spring.datasource.test-on-connect=true
  spring.datasource.validation-interval=300000
  </code></pre>
  
  <p>The properties are validation-interval and time-between-eviction-runs-millis. What is the difference between them? The latter runs to evict the dead connections. But what about validation-interval? </p>
  
  <p>Difference between test-on-borrow and test-on-connect?</p>
  
  <p>I can't seem to find the right place to see their documentation or their purpose, or I am looking at the wrong place.</p>
  
  <p>Please advise.</p>