jhipster 工具之 JDL

使用jhipster JDL,我们可以快速的生产实体,业务逻辑层等类,这样大大提高我们的工作效率,下面就是具体的操作流程
1.用jhipster新建一个项目,这里就直接跳过了,不懂的直接看文档
2.然后添加一个jhipster-jdl.jh,文件内容如下
entity BusAssess {
id Long ,
tId Long,
replyPic String,
storesId Integer,
created ZonedDateTime,
createTime ZonedDateTime,
updateTime ZonedDateTime
}

entity BusItemAssess {
id Long,
itemId Long,
negativePackingNum Integer,
negativeLogisticsNum Integer,
storesId Integer,
created ZonedDateTime,
createTime ZonedDateTime,
updateTime ZonedDateTime
}

// Set pagination options 定义分页
paginate all with pagination
//生成mapper
dto * with mapstruct

// Set service options to all except few 生成service
service all with serviceImpl except All
// Set an angular suffix
angularSuffix * with mySuffix
3.文件编写好后,直接开打cmd,进入项目目录,执行jhipster import-jdl jhipster-jdl.jh
,执行完后就会出现下面内容
jhipster 工具之 JDL
这里直接回车
jhipster 工具之 JDL
选择Y,后面的操作也是如此,最后这样就生成好了
jhipster 工具之 JDL
这里需要注意实体的类型,下面是对应类型表
jhipster 工具之 JDL

这里有不懂的可以查看官网文档https://www.jhipster.tech/jdl/