java 从 JPA 实体自动生成 Spring Data Repositories
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41257851/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Generate automatically Spring Data Repositories from JPA entities
提问by CPA
I have a lot of JPA entities automatically created from a relational database schema.
我有很多从关系数据库模式自动创建的 JPA 实体。
Is there any way to generate also there corresponding Spring Data Repositories (Repository interfaces)?
有没有办法生成相应的 Spring Data Repositories(Repository 接口)?
采纳答案by Ihor Dobrovolskyi
You can use Spring Roo to create models and repositories by one command. http://docs.spring.io/spring-roo/reference/html/intro.html
您可以使用 Spring Roo 通过一个命令创建模型和存储库。 http://docs.spring.io/spring-roo/reference/html/intro.html