Skip to content

Log JDBC connection URL for embedded database when using H2 console #17063

Closed
@sbrannen

Description

@sbrannen

When testing a web application with an embedded H2 database and the H2 console enabled (spring.h2.console.enabled=true), it would be useful if Spring Boot logged the JDBC connection URL so that users know how to connect to the database from the /h2/console endpoint.

As @wilkinsona mentioned elsewhere, it would be even better if the H2 console could be prepopulated with the right JDBC connection URL.

FWIW, the embedded database support in core Spring always logs the JDBC connection URL at INFO level (see org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactory.initDatabase()).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions