Liquibase 假装文件夹中没有 liquibase.properties?

Liquibase pretending there's no liquibase.properties in the folder?

我认为 liquibase 正在我放置在 linux' /opt 文件夹中的 liquibases 文件夹中寻找该文件。

那个文件夹 (/opt/liquibase) 已经在 profile.d 中,所以我可以在任何地方调用 liquibase。

然而,当我输入 "liquibase update" 时,它在终端上给出了以下输出:

Starting Liquibase at Sun, 15 Sep 2019 23:00:43 CEST (version 3.8.0 built at 2019-08-15T20:38:06Z)
Liquibase Community 3.8.0 by Datical
Errors:
The option --url is required.
The option --changeLogFile is required.

这让我想知道为什么缺少 url 和 changeLogFile,因为在 /opt/liquibase/liquibase.properties 中,我得到以下几行:

driver: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/luquibase?autoReconnect=true&useSSL=false
username: zend
password: zend
changeLogFile: ~/html/zend/sql/changelog.xml

我这里做错了什么?

这是设计行为。预计使用 liquibase 的人会在多个项目上使用它,因此它会在当前目录中查找 liquibase.properties 文件,该文件可能不是 liquibase shell 脚本所在的目录。