Kotlin 配置Liquibase Gradle插件以生成更改集
我试图从Spring Boot项目中的实体生成一个Liquibase变更日志。这就是我的Gradle的样子:Kotlin 配置Liquibase Gradle插件以生成更改集,kotlin,gradle,spring-data-jpa,liquibase,gradle-kotlin-dsl,Kotlin,Gradle,Spring Data Jpa,Liquibase,Gradle Kotlin Dsl,我试图从Spring Boot项目中的实体生成一个Liquibase变更日志。这就是我的Gradle的样子: plugins { // other plugins id("org.liquibase.gradle") version "2.0.3" } dependencies { val kapt by configurations // other dependencies implementation(&q
plugins {
// other plugins
id("org.liquibase.gradle") version "2.0.3"
}
dependencies {
val kapt by configurations
// other dependencies
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.liquibase:liquibase-core")
runtimeOnly("org.postgresql:postgresql")
}
这是我的应用程序。yml
:
spring:
datasource:
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:test}
username: ${DB_USERNAME:db_username}
password: ${DB_PASSWORD:db_password}
jpa:
hibernate.ddl-auto: validate
database-platform: org.hibernate.dialect.PostgreSQL95Dialect
liquibase:
enabled: true
我已创建了液化资产。财产:
changeLogFile=classpath:db/changelog/db.changelog-master.yaml
url=jdbc:postgresql://localhost:5432/test
username=db_username
password=db_password
driver=org.postgresql.Driver
referenceUrl=hibernate:spring:com.example?dialect=org.hibernate.dialect.PostgreSQL95Dialect
diffChangeLogFile=db/changelog/changes/diff-changes.yaml
运行/gradlew generateChangelog--info
时,输出如下:
> Task :generateChangelog
Caching disabled for task ':generateChangelog' because:
Caching has not been enabled for the task
Task ':generateChangelog' is not up-to-date because:
Task has not declared any outputs despite executing actions.
:generateChangelog (Thread[Execution worker for ':',5,main]) completed. Took 0.003 secs.
BUILD SUCCESSFUL in 650ms
据我所知,插件并没有正确配置,但我不能理解是什么错了。它不会失败,而且在他们的Github页面上有一个现有的解决方案。此运行后不会生成任何内容无法理解我配置不正确的原因无法找到文档,甚至无法正确理解可能出现的问题Github的描述对我来说似乎很不清楚。
liquibase.properties
应该是liquibase.properties
liquibase.properties
应该是liquibase.properties