【发布时间】:2020-01-02 13:26:09
【问题描述】:
我使用 Gradle 和 Kotlin 创建了一个 Spring Boot 项目,版本为 2.2.3.BUILD-SNAPSHOT。我也想用 liquibase,但我做不到。
使用相同的设置,但使用 Java,我可以使 liquibase 工作。
这是我的资源文件夹:
这些是我的依赖:
dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.liquibase:liquibase-core")
runtimeOnly("org.postgresql:postgresql")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
testImplementation("org.springframework.security:spring-security-test")
}
【问题讨论】:
-
您是否收到任何异常或错误消息?您的项目目录布局如何?您使用的是 Maven 还是 Gradle?您必须提供更多我们可以帮助您的信息
-
我没有收到任何错误消息,我认为 liquibase 甚至没有尝试执行,而且我没有数据源。我正在使用 Gradle
-
“我没有数据源”是什么意思,请提供目录结构
-
嗨,西蒙,感谢您的留言。我编辑了评论并附加了资源文件夹和 build.gradle.kts 中的依赖项
标签: spring-boot kotlin liquibase