I have been working with some of the spring properties mentioned here: application-properties
In particular, the liquibase
properties.
In my yml file, if I use yml's tree-like syntax:
spring:
liquibase:
change-log: classpath:/db/changelog/db.changelog-master-test-h2.yml
Spring doesn't pick up the value. (More specifically, Spring's org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties class doesn't pick up the value)
But if I use "property file" syntax:
spring.liquibase.change-log: my-path
Spring does pick up the value.
I was under the impression that in the Spring framework, the 2 syntaxes were interchangeable, but apparently not.
What is going on here?
NOTE: I have tried these variations.
These work:
spring.liquibase.change-log: classpath:/db/changelog/db.changelog-master-test-h2.yml
spring.liquibase.changeLog: classpath:/db/changelog/db.changelog-master-test-h2.yml
These do not work:
spring:
liquibase:
change-log: classpath:/db/changelog/db.changelog-master-test-h2.yml
spring:
liquibase:
changeLog: classpath:/db/changelog/db.changelog-master-test-h2.yml
full contents of my application.yml
---
spring.profile: h2
spring:
datasource:
url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
driver-class-name: org.h2.Driver
jpa:
database: h2
hibernate:
ddl-auto: none
properties:
hibernate:
dialect: org.hibernate.dialect.H2Dialect
format_sql: true
show-sql: true
liquibase:
enabled: true
# change-log: classpath:/db/changelog/db.changelog-master-test-h2.yaml
url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
default-schema: PUBLIC
spring.liquibase.change-log: classpath:/db/changelog/db.changelog-master-test-h2.yaml