Java 如何从类路径运行Liquibase changeLogFile
我有一个配置为运行Liquibase的Spring引导应用程序。我正在尝试建立一个单独的项目,作为数据库管理项目使用。它将存储不同数据库的所有Java 如何从类路径运行Liquibase changeLogFile,java,spring-boot,maven,classpath,liquibase,Java,Spring Boot,Maven,Classpath,Liquibase,我有一个配置为运行Liquibase的Spring引导应用程序。我正在尝试建立一个单独的项目,作为数据库管理项目使用。它将存储不同数据库的所有liquibase.properties文件 我的数据库管理项目依赖于我的主应用程序,因为它需要加载chaneglogFile。但是,我的数据库管理项目在类路径上找不到changelogFile 下面是主项目的文件夹结构。变更日志位于src/main/resources中,因此maven会自动将其添加到类路径中 以下是liquibase.properti
liquibase.properties
文件
我的数据库管理项目依赖于我的主应用程序,因为它需要加载chaneglogFile。但是,我的数据库管理项目在类路径上找不到changelogFile
下面是主项目的文件夹结构。变更日志位于src/main/resources
中,因此maven会自动将其添加到类路径中
以下是liquibase.properties
changeLogFile=classpath:db/changelog/db.changelog-master.yaml
以及maven插件配置
org.liquibase
liquibase maven插件
3.8.2
液化酶性质
com.my-group
我的应用程序
1.0.0-SNAPSHOT
以及由此产生的错误
Failed to execute goal org.liquibase:liquibase-maven-plugin:3.8.2:status (default-cli) on project my-app-db: Error setting up or running Liquibase: classpath:db/changelog/db.changelog-master.yaml does not exist
试一试怎么样
changeLogFile=src/main/resources/db/changelog/db.changelog master.yaml
这对您有用吗?类路径:前缀是Spring特有的功能,您可能需要
/db/changelog/db.changelog master.yaml
,另请参见@robertschlote我尝试过,但没有成功。