I have a Spring 4.1.0 back-end application with domain classes annotated in JPA (w/Hibernate 4.3.5 as the persistence provider) using Maven as the build tool. I now want to add a web front-end to this app and am playing with JHipster. I want to re-use my existing JPA annotated domain classes and Spring Data JPA repos with JHipster and but have JHipster create controllers and views for each domain model. My first milestone goal is to get basic CRUD functionality on the old domain models from this web app.
Here's an example of what my domain classes look like (the City class):
raster_tindex
Is it possible to re-use this class and the other 50+ that I have already written? If so, how?
答案 0 :(得分:0)
不,不幸的是,它不可能重复使用它们。在jhipster中,生成实体时会生成视图。解决方案是使用jhipster:entity或jhipster-uml重新创建它们。
我相信你能做的最好的事情可能是重新创建实体,最好使用一些SCM提交这个版本,然后使用JPA映射对它们进行微调。不完美,但重用现有实体目前是一个限制。