我使用 JDL studio 创建文件时没有错误,但是当我使用 jhipster cli 导入文件时出现以下错误:
使用在当前项目的 node_modules 本地安装的 JHipster 版本执行 jhipster:import-jdl ./thearthacker-jdl.jh 选项: 正在解析 jdl。 事件.js:182 投掷者;// 未处理的“错误”事件 ^ 错误:错误! 从 JDL 解析实体时出错 在 Environment.error (E:\web_project\_PROJECT\thearthackers\node_modules\yeoman-environment\lib\environment.js:140:40) 在 constructor.error (E:\web_project\_PROJECT\thearthackers\node_modules\generator-jhipster\generators\generator-base.js:1686:18) 在 constructor.parseJDL (E:\web_project\_PROJECT\thearthackers\node_modules\generator-jhipster\generators\import-jdl\index.js:108:22) 在对象。(E:\web_project\_PROJECT\thearthackers\node_modules\yeoman-generator\lib\index.js:417:23) 在 E:\web_project\_PROJECT\thearthackers\node_modules\run-async\index.js:25:25 在承诺 () 在 E:\web_project\_PROJECT\thearthackers\node_modules\run-async\index.js:24:19 在 E:\web_project\_PROJECT\thearthackers\node_modules\yeoman-generator\lib\index.js:418:9 在 runCallback (timers.js:781:20) 在 tryOnImmediate (timers.js:743:5)
这是我的 JDL 文件:
entity Video {
name String required,
type String required,
url String required,
quality String,
description String required,
submissionDate ZonedDateTime required
}
entity Picture {
name String required minlength(3),
type String required,
url String required,
size String,
description String,
submissionDate ZonedDateTime required
}
entity Blog {
name String required minlength(3),
}
entity Entry {
title String required,
content String required,
date ZonedDateTime required
}
entity Tag {
name String required minlength(2)
}
relationship ManyToMany {
Entry{tag(name)} to Tag{entry}
}
relationship ManyToMany {
Picture{tag(name)} to Tag{Picture}
}
relationship ManyToMany {
Video{tag(name)} to Tag{Video}
}
relationship ManyToMany {
Blog{tag(name)} to Tag{Blog}
}
relationship ManyToMany {
User{tag(name)} to Tag{User}
}
relationship ManyToOne {
Video{video} to User
}
relationship ManyToOne {
Picture{video} to User
}
relationship ManyToOne {
Blog{video} to User
}
relationship ManyToOne {
Entry{video} to Blog
}
paginate Entry, Tag with infinite-scroll
dto * with mapstruct
任何想法 ?
感谢帮助。