I want to be able to leverage the Spring Boot datasource auto-configuration. However it doesn't support all the features I'm using, logValidationErrors
in particular.
spring:
datasource:
driverClassName: oracle.jdbc.OracleDriver
url: jdbc:jtds:sqlserver://111.11.11.11/DataBaseName
username: someuser
password: somepass
testOnBorrow: true
testWhileIdle: true
validationQuery: select /* validationQuery */ 1 from dual
minEvictableIdleTimeMillis: 1000
validationInterval: 30000
These aren't currently used:
logValidationErrors: true
maxAge: 1800000 # //30 Minute idle age
removeAbondoned: true
Can I just grab the created DataSource bean and set those values manually? Or is there a better way to extend or wrap the autoconfiguration?
See here for more about logValidationErrors
, etc: https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html