spring-attic / spring-cloud-aws

All development has moved to https://github.com/awspring/spring-cloud-aws Integration for Amazon Web Services APIs with Spring
https://awspring.io/
Apache License 2.0
590 stars 373 forks source link

[RDS] Use Spring Tomcat Datasource properties in default Tomcat datasource #739

Open Kraignos opened 3 years ago

Kraignos commented 3 years ago

Would it be possible to get the following Spring datasource properties and integrate them in the TomcatJdbcDataSourceFactory class when you create a new datasource within the createDataSource method ? For now, it is instanciated with the default values coming from the Tomcat class PoolProperties, but it makes sense to consider those properties that spring provides inside this default datasource factory.

This would allow us to override some configuration of the pool such as the timeouts, number of connections, etc. without having to create a configuration class for it.

eddumelendez commented 3 years ago

Hi @Kraignos you can use DataSourceAutoConfiguration from spring-boot which means using spring.datasource.* configuration properties. Wondering if you are using spring-cloud-aws-jdbc for any special reason?