Currently, to use LazyConnectionDataSourceProxy in Spring Boot, developers have to manually wrap the DataSource in code. While there was a similar suggestion in the past (https://github.com/spring-projects/spring-boot/issues/15480), it appears that this feature has not yet been implemented.
I would like to propose adding support for configuring LazyConnectionDataSourceProxy directly through application.yaml.
By enabling this setting, the DataSource could be automatically wrapped with LazyConnectionDataSourceProxy, offering greater convenience to developers.
If the Spring team is open to it, I would like to work on implementing this feature myself. :)
Comment From: wilkinsona
Duplicates #15480.
@erie0210 Please do not deliberately duplicate an existing issue, particularly one that is still open.