Most of the setters in BasicDataSource can be configured from application.yml. https://commons.apache.org/proper/commons-dbcp/apidocs/org/apache/commons/dbcp2/BasicDataSource.html#setConnectionProperties-java.lang.String- cannot be configured.
Both Hikari and Tomcat have ways of configuring the properties that get sent to the driver but dbcp2 does not as this setter seems not to get registered by the @ConfigurationProperties annotation.
This limits the configurability of a dbcp2 datasource via spring boot