如何定义模型规格文件?
How to define model specification file?
请帮助解决以下错误,我正在获取一些模型规范,但我不确定如何定义。
JHipster JDL 文件内容
application {
config {
baseName myApp,
applicationType monolith,
packageName com.myapp,
authenticationType jwt,
prodDatabaseType postgresql,
clientFramework angular
enableSwaggerCodegen true
}
entities *
}
// One to One
entity Product { name String }
entity Origin { name String}
relationship OneToOne { Product to Origin }
// Many to One
entity Rating { name String }
entity Movie { name String }
relationship ManyToOne { Rating to Movie }
// One to Many
entity Customer { name String }
entity Address { name String }
relationship OneToMany { Customer to Address }
// Many to Many
entity Car { name String }
entity Owner { name String }
relationship ManyToMany { Car to Owner }
错误
构建成功后,我尝试了以下 ./mvnw
,尽管应用 运行 正常,但出现了以下错误...
2021-06-02 14:50:24.334 DEBUG 574 --- [ restartedMain] Validator : ERROR [ModelSpecification.spec] At least one type of specification is required
2021-06-02 14:50:24.337 DEBUG 574 --- [ restartedMain] Validator : ERROR [ModelSpecification.spec] At least one type of specification is required
2021-06-02 14:50:24.342 DEBUG 574 --- [ restartedMain] Validator : ERROR [ModelSpecification.spec] At least one type of specification is required
这并不是真正的错误,因为它是在 DEBUG 级别记录的。虽然比较乱,但是可以无视
这是一个已知问题,将在下一版本 7.1.0 中修复,请参阅 https://github.com/jhipster/generator-jhipster/issues/13835
请帮助解决以下错误,我正在获取一些模型规范,但我不确定如何定义。
JHipster JDL 文件内容
application {
config {
baseName myApp,
applicationType monolith,
packageName com.myapp,
authenticationType jwt,
prodDatabaseType postgresql,
clientFramework angular
enableSwaggerCodegen true
}
entities *
}
// One to One
entity Product { name String }
entity Origin { name String}
relationship OneToOne { Product to Origin }
// Many to One
entity Rating { name String }
entity Movie { name String }
relationship ManyToOne { Rating to Movie }
// One to Many
entity Customer { name String }
entity Address { name String }
relationship OneToMany { Customer to Address }
// Many to Many
entity Car { name String }
entity Owner { name String }
relationship ManyToMany { Car to Owner }
错误
构建成功后,我尝试了以下 ./mvnw
,尽管应用 运行 正常,但出现了以下错误...
2021-06-02 14:50:24.334 DEBUG 574 --- [ restartedMain] Validator : ERROR [ModelSpecification.spec] At least one type of specification is required
2021-06-02 14:50:24.337 DEBUG 574 --- [ restartedMain] Validator : ERROR [ModelSpecification.spec] At least one type of specification is required
2021-06-02 14:50:24.342 DEBUG 574 --- [ restartedMain] Validator : ERROR [ModelSpecification.spec] At least one type of specification is required
这并不是真正的错误,因为它是在 DEBUG 级别记录的。虽然比较乱,但是可以无视
这是一个已知问题,将在下一版本 7.1.0 中修复,请参阅 https://github.com/jhipster/generator-jhipster/issues/13835