I have the changeset “create_db.sql” with a lot of placeholders, like: ${tbspace}, ${tbsfile} etc.
To have them replaced, I use a property file in the changelog:
<databaseChangeLog …
<property file="myapplication.yml" />
The property file “myapplication.yml” (located in src/main/resources) contains:
tbspace: mytbspace
tbsfile: myfile.dbf
…
Everything works fine from Intellij, the variables are replaced, but from the command line it doesn’t work:
> java -jar -Dspring.config.location=myapplication.yml myapp.jar
The cause is that liquibase searches the file “myapplication.yml” inside the jar, while I need to use the file outside the jar (I copied the file and put it next to the jar file).
I use SpringBoot.
Any idea how to make it work?
Thanks in advance