-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Log URLs for all DataSources when H2 Console is auto-configured #28204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@StitzL Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@StitzL Thank you for signing the Contributor License Agreement! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
We already have a test for the single datasource use case (see dataSourceUrlIsLoggedWhenAvailable
). We'd need an additional test for the code that you've changed. Can you please look at that?
Also, this enhancement is not going to be backported so the base branch should be main
(don't worry about it if you can't change it, we can take care of that as part of merging).
...gure/src/main/java/org/springframework/boot/autoconfigure/h2/H2ConsoleAutoConfiguration.java
Outdated
Show resolved
Hide resolved
Sure, I just have to figure out how to create a second datasource in that test scenario. |
Check |
- Expect no log output at all when no DataSource offers a valid connection. - Expect a single log line containing the path of the H2 console, followed by comma-separated URLs of each data source offering a connection.
Log path of H2 console, followed by comma-separated URLs of each data source that offers a connection, in order, primary first.
This commit logs the path of the H2 console, followed by the comma-separated ordered URLs of each data source that offers a connection. See gh-28204
@StitzL thank you for making your first contribution to Spring Boot. |
My pleasure! Thanks for the feedback and your work on this as well. |
Always log path of H2 console, then log details for each data source that offers a connection, in order, primary first.
Resolves #27881