Spring boot 下面的Spring数据源属性是什么意思?

Spring boot 下面的Spring数据源属性是什么意思?,spring-boot,Spring Boot,我遇到了一些Spring Boot的数据源属性,它们是在application.properties中指定的。我很难理解数据源属性的用途。 另外,我在这里找不到对datasource的这些属性的解释,我使用的是SpringBootVersion1 spring.datasource.test-while-idle=true spring.datasource.initial-size=10 spring.datasource.min-idle=10 spring.datasource.time-

我遇到了一些Spring Boot的数据源属性,它们是在application.properties中指定的。我很难理解数据源属性的用途。 另外,我在这里找不到对datasource的这些属性的解释,我使用的是SpringBootVersion1

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
属性是验证间隔和逐出运行之间的时间(毫秒)。他们之间有什么区别?后者运行以清除已断开的连接。但是验证间隔呢

借用测试和连接测试之间的差异

我似乎找不到正确的地方查看他们的文档或目的,或者我看错了地方


请告知。

以下解释基于我的经验,供您参考

spring.datasource.execution运行之间的时间间隔为毫秒
表示回收空闲连接的时间间隔。它通常在空闲时与spring.datasource.test一起使用

spring.datasource.min可收回空闲时间毫秒
表示连接池中空闲连接的有效时间

spring.datasource.test on borrow
表示是否在从连接池借用连接时测试连接。它可能会对性能产生一些影响


spring.datasource.teston connect
表示是否在创建连接时测试连接。

以下解释基于我的经验,供您参考

spring.datasource.execution运行之间的时间间隔为毫秒
表示回收空闲连接的时间间隔。它通常在空闲时与spring.datasource.test一起使用

spring.datasource.min可收回空闲时间毫秒
表示连接池中空闲连接的有效时间

spring.datasource.test on borrow
表示是否在从连接池借用连接时测试连接。它可能会对性能产生一些影响


spring.datasource.test on connect
表示在创建连接时是否测试连接。

请参考此链接,您可以获得一些有用的信息谢谢您的链接。但是在那里也是一样的-没有解释这两个属性是什么。请参考这里你可以得到一些有用的信息谢谢你的链接。但在那里也是一样的——没有解释这两个属性是什么。