Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I despise writing a bunch of dao/repo code, so I've resorted to codegen-ing my daos/repos.

Spring Data does this very well, in a fashion partly inspired by ActiveRecord. You define a Repository interface with whatever search methods suit your case; a concrete class is built and injected for you. The same interface can back onto JPA databases, Mongo, Redis and I forget what else.

If you add Spring Data REST, you get a complete RESTful API -- complete with HATEOAS, paging, sorting, searching and HAL -- automagically.

Use Spring Boot and you won't need to do any more than include the dependencies in your Maven POM or build.gradle file.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: