Generate automatically Spring Data Repositories from JPA entities
Asked Answered
P

2

10

I have a lot of JPA entities automatically created from a relational database schema.

Is there any way to generate also there corresponding Spring Data Repositories (Repository interfaces)?

Passageway answered 21/12, 2016 at 8:1 Comment(2)
No. It is one line of code per repository.Purchasable
If you use spring boot, use Spring Data Generator github.com/cmeza20/spring-data-generator Generates repositories when executing the projectFustigate
C
5

You can use Spring Roo to create models and repositories by one command. http://docs.spring.io/spring-roo/reference/html/intro.html

Collettecolletti answered 21/12, 2016 at 8:27 Comment(2)
New Website for Spring Roo: projects.spring.io/spring-rooRoutinize
can we use it in an existing project that is not created initially using Roo?Patrica
S
0

Wel, it's not for JPA, but I created a tool, EWA, for creating Repositories, Services and Models for Spring Boot + sql2o, a simple db driver, the fastest after pure JDBC.

Stomachic answered 6/6, 2019 at 16:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.