我已经用一个简单的实体用JHipster 6.1.2和h2为dev生成了一个整体示例应用程序。 它使用fakerrjs生成10行示例数据,但是如果我在data.csv文件中再添加一行,则会生成liquibase错误:
2019-06-28 21:59:45.991 DEBUG 16399 --- [ restartedMain] i.g.s.config.LiquibaseConfiguration : Configuring Liquibase
2019-06-28 21:59:46.149 WARN 16399 --- [ paging-task-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Starting Liquibase asynchronously, your database might not be ready at startup!
2019-06-28 21:59:48.395 ERROR 16399 --- [ paging-task-1] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase could not start correctly, your database is NOT ready: Validation Failed:
1 change sets check sum
config/liquibase/changelog/20190628133935_added_entity_Book.xml::20190628133935-1-data::jhipster was: 8:ee6d55c24ca401dedb5c3a420721517b but is now: 8:cbad83788edd5ca52ce6bbe66744f473
liquibase.exception.ValidationFailedException: Validation Failed:
1 change sets check sum
config/liquibase/changelog/20190628133935_added_entity_Book.xml::20190628133935-1-data::jhipster was: 8:ee6d55c24ca401dedb5c3a420721517b but is now: 8:cbad83788edd5ca52ce6bbe66744f473
at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:276)
at liquibase.Liquibase.update(Liquibase.java:198)
at liquibase.Liquibase.update(Liquibase.java:179)
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:353)
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:305)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.initDb(AsyncSpringLiquibase.java:119)
at io.github.jhipster.config.liquibase.AsyncSpringLiquibase.lambda$afterPropertiesSet$0(AsyncSpringLiquibase.java:94)
at io.github.jhipster.async.ExceptionHandlingAsyncTaskExecutor.lambda$createWrappedRunnable$1(ExceptionHandlingAsyncTaskExecutor.java:78)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2019-06-28 21:59:48.896 DEBUG 16399 --- [ restartedMain] io.goovy.sampleapp.config.WebConfigurer : Registering CORS filter
这是.yo-rc.json:
{
"generator-jhipster": {
"promptValues": {
"packageName": "io.goovy.sampleapp"
},
"jhipsterVersion": "6.1.2",
"applicationType": "monolith",
"baseName": "paging",
"packageName": "io.goovy.sampleapp",
"packageFolder": "io/goovy/sampleapp",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "maven",
"enableSwaggerCodegen": false,
"jwtSecretKey": "NDljY2EyOGMxZjNiNmEyNzk0ODc2MTM2OWIwZTQwNjY1MDRkYWRkNzdmOTE0N2M1NThlOWUwNzc5MDE0MDIwNWQ2OTI1ODU5NTk3YWQzNzRlMDc5MTQ2NTkyYWY4ZDllMTBhNzEyNDU5NWE4ZTIwNDg2MWMzNmQwNTE4OWE5MDk=",
"useSass": true,
"clientPackageManager": "npm",
"clientFramework": "angularX",
"clientTheme": "darkly",
"clientThemeVariant": "dark",
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": false
}
}
我创建了一个简单的实体书:
{
"fluentMethods": true,
"clientRootFolder": "",
"relationships": [],
"fields": [
{
"fieldName": "name",
"fieldType": "String"
},
{
"fieldName": "author",
"fieldType": "String"
},
{
"fieldName": "release",
"fieldType": "LocalDate"
}
],
"changelogDate": "20190628133935",
"dto": "mapstruct",
"searchEngine": false,
"service": "serviceImpl",
"entityTableName": "book",
"databaseType": "sql",
"jpaMetamodelFiltering": true,
"pagination": "pagination"
}
任何想法都是最佳做法吗?