【发布时间】:2016-10-30 17:21:41
【问题描述】:
我使用 jdl-studio 创建了一个 jdl 文件。 我绑定使用 jdl-import 从 jdl 文件创建实体。
下面是我的cmd终端的sn-p:
D:\spring-boot\examples\espressob>yo jhipster:import-jdl ./jhipster-jdl.jh
The jdl is being imported.
D:\spring-boot\examples\espressob>
问题
它只是打印 jdl 文件正在被导入,就是这样。 我检查了它是否为 jdl 文件中的实体生成代码,不幸的是它没有。
环境详情
.yo-rc.json 文件内容:
{
"generator-jhipster": {
"jhipsterVersion": "3.4.2",
"baseName": "espressob",
"packageName": "com.iwantunlimited.espressob",
"packageFolder": "com/iwantunlimited/espressob",
"serverPort": "8080",
"authenticationType": "jwt",
"hibernateCache": "hazelcast",
"clusteredHttpSession": "hazelcast",
"websocket": "spring-websocket",
"databaseType": "sql",
"devDatabaseType": "postgresql",
"prodDatabaseType": "postgresql",
"searchEngine": "elasticsearch",
"buildTool": "maven",
"enableSocialSignIn": true,
"jwtSecretKey": "790501d7e04040394e33964a4ee715408ec0408f",
"useSass": true,
"applicationType": "monolith",
"testFrameworks": [
"gatling",
"cucumber",
"protractor"
],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en",
"fr",
"hi"
]
}
}
jhipster-jdl.jh文件内容:
entity InsuranceCategory {
name String required,
description String,
isActive Boolean,
createdDate ZonedDateTime,
modifiedDate ZonedDateTime,
}
relationship ManyToOne {
InsuranceCategory{createdBy} to User
}
relationship ManyToOne {
InsuranceCategory{modifiedBy} to User
}
entity InsuranceProvider {
name String required,
isActive Boolean,
createdDate ZonedDateTime,
modifiedDate ZonedDateTime,
}
relationship ManyToOne {
InsuranceProvider{createdBy} to User
}
relationship ManyToOne {
InsuranceProvider{modifiedBy} to User
}
relationship ManyToMany {
InsuranceCategory{provider} to InsuranceProvider{category}
}
entity Policy {
name String required,
isActive Boolean,
createdDate ZonedDateTime,
modifiedDate ZonedDateTime,
}
relationship ManyToOne {
Policy{createdBy} to User
}
relationship ManyToOne {
Policy{modifiedBy} to User
}
relationship OneToMany {
InsuranceCategory{policy} to Policy
}
relationship OneToMany {
InsuranceProvider{policy} to Policy
}
dto all with mapstruct
试过了:
删除与用户实体的关系 -> 不起作用
重新排列 jdl 文件中的条目序列(首先是所有实体,然后是关系)-> 不起作用
【问题讨论】:
-
您是否尝试过导入 (jhipster import-jdl jhipster-jdl.jh) 从文件 (jhipster-jdl.jh) 所在的同一子目录调用它? (不带 ./)
标签: jhipster