DAO generator for java [closed]

送分小仙女□ 提交于 2019-12-02 21:07:17

None of these are perfect matches, but both rock, in their own individual way:

  1. Spring Roo generates DAOs, Web Controllers and more for you.
  2. QueryDSL automatically creates Objects from your database tables and offers an Object-Oriented query syntax with compile-time safety.

But I'd say the winner is Spring Data. It offers a simple but powerful abstraction over many different underlying data store technologies and generates daos for you automatically. Here's a presentation of Spring Data JPA. Unfortunately Spring Data has not been released in final versions yet.

To add to duffymo's answer, MyBatis is good and you can use the MyBatis generator to generate data access code.

If you just need a code generator without adherence to a framework, you should try Telosys Tools. It's a lightweight tool, it generates code from an existing database model.

See https://www.telosys.org

Some templates are specially designed for JDBC code generation, they are available on GitHub https://github.com/telosys-templates-v3

They offer code generation for DAO, DAO interfaces, POJO (beans), JUnit tests, etc

I wouldn't be much in favor of automatic generation.

I can recommend iBatis as a half step between JDBC and Hibernate.

You can do this with Hibernate Tools. But I personally never tried it, I have only created entity classes by now.

I would second iBatis. Other suggestion can be Spring JDBCTemplate. Since you are fine to adopt a framework, so why not go with Spring. It will also facilitate you with other great things.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!