Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'spring.datasource.testWhileIdle' is an unknown property. Did you mean 'spring.datasource.tomcat.abandon-when-percentage-full'?

I am working on Spring Boot JDBC MYSQL example. In this example I had used 1.3.1.RELEASE spring boot starter version that time I had used the following 2

spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1

properties which were not showing any warnings. Now when I updated to 1.5.13.RELEASE its giving me warning. It seems to me that something has changed. I went through https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/common-application-properties.html, but I did not get clear understanding of what has exactly changed. Could anyone please guide ?

like image 937
Jeff Cook Avatar asked Aug 31 '25 01:08

Jeff Cook


1 Answers

When in production/RELEASE version, you've to change this

spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1

to

spring.datasource.tomcat.test-while-idle=true
spring.datasource.tomcat.validation-query=SELECT 1

See if it works.

like image 56
fluffyBatman Avatar answered Sep 02 '25 19:09

fluffyBatman