[英]Liquibase use a changelog outside of my jar file
I developed an app that uses Liquibase and built a jar file.我开发了一个使用 Liquibase 的应用程序并构建了一个 jar 文件。
I was wondering if it is possible to use a changelog file that is outside of the jar file , like for example:我想知道是否可以使用 jar 文件之外的更改日志文件,例如:
-Folder
--jar file
--changelogFile
I know that Liquibase removed the option to use an absolute path , so is there any other way to achieve this?我知道 Liquibase 删除了使用绝对路径的选项,那么还有其他方法可以实现吗?
Found an answer.找到了答案。 If you are using the Java liquibase Api just use a ResourceAccessor
如果您使用的是 Java liquibase Api,请使用 ResourceAccessor
ResourceAccessor accessor= new FileSystemResourceAccessor("C:\\Users\\demo\\Documents\\Migrations");
return new Liquibase(changelog, accessor, connection);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.