Description:
When using Spring Boot with Liquibase, there are two relevant configuration properties:
spring.liquibase.default-schema – schema for user tables spring.liquibase.liquibase-schema – schema for Liquibase technical tables
These properties allow separating Liquibase's internal changelog tables from the application's domain tables.
Currently, the LiquibaseEndpoint implementation in LiquibaseEndpoint.createReport(SpringLiquibase liquibase, DatabaseFactory factory) always retrieves the schema using:
String defaultSchema = liquibase.getDefaultSchema();
As a result, the endpoint ignores the configured liquibase-schema property and always falls back to defaultSchema.
Steps to Reproduce:
- Configure Liquibase with different schemas:
spring.liquibase.default-schema=app_schema
spring.liquibase.liquibase-schema=liquibase_schema
- Run the application.
- Check the /actuator/liquibase endpoint.
Expected Behavior:
The actuator should respect the spring.liquibase.liquibase-schema property if it is set. If liquibase-schema is configured, the endpoint should use it when generating reports. If it is not set, then default-schema should be used.
Actual Behavior:
The actuator always uses default-schema, even when liquibase-schema is configured.
Versions Affected:
Spring Boot 4 (4.0.0-M3)