node.js - 如何在 node.js 中使用自定义更改
问题描述
我开发了一些实现 CustomTaskChange 的类并构建了一个 jar 文件。然后我在 liquibase 类路径中加载了那个 jar
const myConfig = {
...POSTGRESSQL_DEFAULT_CONFIG,
changeLogFile: 'db/master/changelog.xml',
url: 'jdbc:postgresql://localhost:5432/saft-demo-dump?allowMultiQueries=TRUE',
username: 'postgres',
password: '*******',
classpath:"jar/postgresql-42.2.20.jar;jar/migrations-0.0.1-SNAPSHOT.jar"
}
const instTs = new LiquibaseTS(myConfig);
我正在尝试通过 XML 文件访问一个类,但我得到了一个ClassNotFoundException
。我该如何使用它?
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd">
<changeSet author="fabio" id="bd69067q-qr00-4400-902b-0091c5d29681">
<customChange class="liquibase.change.custom.CustomChange.MultipleAdd"
suffix="transactions" columnName="NODE_COLUMN" columnType="varchar(250)">
</customChange>
</changeSet>
</databaseChangeLog>
解决方案
这可能是因为我们必须:
在 classpath 属性中使用分隔符,而不是;
.
推荐阅读
- reactjs - 如何使用 react-testing-library 将数组作为道具进行单元测试
- gradle - 如何从项目依赖中包含存根合同
- python - 为什么 Python 需要这么长时间来处理我的正则表达式?
- python - 仅从命令行 pandas 数据帧加载具有日期范围的文件
- html - 如何检查下一个复选框是否被选中?
- javascript - 为什么我的 ondragstart 操作在执行后立即撤消?
- python - 如何使用 pipx 安装 virtualenv?
- android - React Native Android:无法获取 BatchedBridge,请确保您的捆绑包已正确打包
- javascript - Console.log 输出与返回输出不一样?
- python - 当我尝试在 Python 中的文件上使用 read() 函数时,输出为空白