1

我正在使用 jhipster (jhipsterVersion -> 4.11.1),我通过“yo jhipster:entity”student 创建了 Student 实体,并添加了 rollNo、name、course 等字段。在运行 gradlew commad 运行应用程序之后,到目前为止一切正常,使用给定的适当字段成功创建实体。

但是1天后,我需要添加新字段,例如collegeName,然后我再次运行“yo jhipster:entity student”命令并再添加一个字段collegeName并成功构建消息但是当我运行gradlew命令运行应用程序时出现如下错误


2017-12-28 15:08:04.442 错误 5268 --- [tapp-Executor-1] igjcliquibase.AsyncSpringLiquibase:Liquibase 无法正确启动,您的数据库尚未准备好:验证失败:1 个更改集检查和配置/liquibase/更改日志/20171228063150_added_entity_Student.xml::20171228063150-1::jhip ster 是:7:1e76a424cb8d1fd8f33d27559cee9133 但现在是:7:a69d676fb7b3d1b37c22d109340b7cb2

liquibase.exception.ValidationFailedException: Validation Failed: 1 change sets check sum config/liquibase/changelog/20171228063150_added_entity_Student.xml::20171228063150-1::jhip ster was: 7:1e76a424cb8d1fd8f33d27559cee9133 but is now: 7:a69d676fb7b3d1b37c22d109340b7c2b

    at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:266)
    at liquibase.Liquibase.update(Liquibase.java:210)
    at liquibase.Liquibase.update(Liquibase.java:192)
    at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:431)
    at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:388)

    at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java

:82) 在 io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$ 的 io.github.jhipster.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$0(Asyn cSpringLiquibase.java:64) 1(ExceptionHandlingAsyncTaskExecutor.java:66 ) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 在 java.lang.Thread.run(Thread.java: 748)

2017-12-28 15:08:14.169 INFO 5268 --- [restartedMain] com.quote.TestappApp:在 26.25 秒内启动了 TestappApp(JVM 运行时间为 27.304)

2017-12-28 15:08:14.171 INFO 5268 --- [restartedMain] com.quote.TestappApp:

4

1 回答 1

0

请在终端中运行以下命令 ./mvnw liquibase:clearCheckSums

于 2021-07-09T02:03:57.583 回答