添加/删除现有实体的字段和关系Jhipster

时间:2017-12-28 09:41:50

标签: spring-boot jhipster liquibase gradlew jhipster-registry

我正在使用jhipster(jhipsterVersion - > 4.11.1), 我通过" yo jhipster:entity"创建了学生实体。学生并添加rollNo,name,course等字段。 该运行gradlew commad运行的应用程序,到目前为止一切正常后,实体创建成功的给予适当的领域。

但是在1天之后我需要添加像collegeName这样的新字段,然后我跑了" yo jhipster:实体学生"命令再次添加一个字段collegeName并获得成功的消息,但当我运行gradlew命令运行应用程序时,我得到像下面的错误

2017-12-28 15:08:04.442 ERROR 5268 --- [tapp-Executor-1] i.g.j.c.liquibase.AsyncSpringLiquibase: Liquibase无法正常启动,您的数据库尚未就绪:验证失败:      1更改设置校验和           配置/ liquibase /变化/ 20171228063150_added_entity_Student.xml :: 20171228063150-1 :: jhip ster是:7:1e76a424cb8d1fd8f33d27559cee9133但现在是:7:a69d676fb7b3d1b37c22d109340b7c2b

liquibase.exception.ValidationFailedException:验证失败:      1更改设置校验和           配置/ liquibase /变化/ 20171228063150_added_entity_Student.xml :: 20171228063150-1 :: jhip ster是:7:1e76a424cb8d1fd8f33d27559cee9133但现在是: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.config.liquibase.AsyncSpringLiquibase.lambda $ afterPropertiesSet $ 0(Asyn) cSpringLiquibase.java:64)         at io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda $ createWrappedRunnable $ 1(ExceptionHandlingAsyncTaskExecutor.java:66)         在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)         at 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:

1 个答案:

答案 0 :(得分:0)

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