通过ER建模可以实现ReactJS + Spring Boot架构的代码自动生成。
生成.jh文件导入Jhipster模板即可,.jh文本如下:
实体模型:
entity Region {
regionName String
}
entity Country {
countryName String
}
// an ignored comment
/** not an ignored comment */
entity Location {
streetAddress String,
postalCode String,
city String,
stateProvince String
}
entity Department {
departmentName String required
}
|
关系模型:
relationship OneToOne {
Country{region} to Region
}
relationship OneToOne {
Location{country} to Country
}
relationship OneToOne {
Department{location} to Location
}
|