differences between spring jdbctemplate and Hibernate [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-12-01 21:15:03
Martin Strejc

Hibernate is a really huge solution with data persistence and ORM including JPA implementation. Also, there are defined many ways how to manage entities in Hibernate, how to persist, transactions, etc. In hibernate you can use SQL, HQL or java annotations. JDBC template is just a simple tool that helps you to manage SQL queries and transactions. It is probably better described as a JDBC wrapper or helper. If you prefer managing database queries (SQL) yourself or if you are a beginner, using Spring JdbcTemplate will help you understand how it works. Even if you are working on a bigger application, think about using Hibernate. Just be wary of the learning curve of Hibernate.

It all depends. If you doing a lot of mapping of domain objects to database tables, Hibernate is the solution you'd want to look at. If you are writing a reporting tool that does lots of complicated joins / PL-SQL, look into Spring JDBC Templates.

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