Skip to content

Commit c3e2594

Browse files
Add note about concrete return type on custom datasource beans (#134)
Fixes #116
1 parent 4085c4a commit c3e2594

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ decorator.datasource.datasource-proxy.count-query=false
217217
#### Flexy Pool
218218

219219
If the `flexy-pool-spring-boot-starter` is added to the classpath your datasource will be wrapped to the `FlexyPoolDataSource`.
220+
221+
> [!IMPORTANT]
222+
> If you are not relying on Spring Boot autoconfiguration and instead declare a custom `DataSource` bean, you need to use
223+
> a concrete `DataSource` type as the return value (e.g., `@Bean HikariDataSource dataSource()`) to match the FlexyPool adapter.
224+
220225
With default setting you will start getting messages about acquiring and leasing connections:
221226
```text
222227
2017-07-13 01:31:02.575 INFO 5432 --- [ool-1-worker-50] c.v.flexypool.FlexyPoolDataSource : Connection leased for 1500 millis, while threshold is set to 1000 in dataSource FlexyPoolDataSource
@@ -254,7 +259,7 @@ decorator.datasource.flexy-pool.threshold.connection.acquisition=50
254259
decorator.datasource.flexy-pool.threshold.connection.lease=1000
255260
```
256261

257-
#### Spring Cloud Sleuth (deprecated)
262+
#### Spring Cloud Sleuth (removed since 1.9.0)
258263

259264
##### For Spring Boot users, that DO NOT use Spring Cloud Sleuth
260265
Nothing has changed, this project is continued to be supported and maintained, and can be used to enable JDBC logging

0 commit comments

Comments
 (0)