需要超轻量级java持久层

发布于 2024-12-25 23:49:24 字数 1536 浏览 4 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

陪你搞怪i 2025-01-01 23:49:24

所有这些工具都是非常轻量级的 JDBC 包装器,无需添加任何 ORM / ActiveRecord 功能:

这些工具添加了一些与 ORM/ActiveRecord 模型相关的附加功能,因此不太轻量级:

这些还具有流畅的 API类型安全的 SQL 构造:

All of these tools are very lightweight wrappers for JDBC, without adding any ORM / ActiveRecord features:

These tools add a couple of additional features related to ORM / ActiveRecord models and are thus a bit less lightweight:

These ones also feature a fluent API for typesafe SQL construction:

待"谢繁草 2025-01-01 23:49:24

不要忘记OrmLite

不过,请确保您确实需要 ORM。

编辑以回复评论

对于简单的 Java 项目(现在很少见),我通常不关心 ORM,但仍然使用 Commons BeanUtils 的 RowSetDynaClass 有时会出现。这会包装查询结果并允许使用普通的 BeanUtils copyProperties 类型方法复制到域对象。

Don't forget OrmLite.

Make sure you need an ORM at all, though.

Edit to respond to comment

For simple Java projects (a rarity these days) I often don't bother with ORM, but still use Commons BeanUtils' RowSetDynaClass sometimes. This wraps query results and allows copying to domain objects using normal BeanUtils copyProperties-type methods.

混吃等死 2025-01-01 23:49:24

Spring 的 SimpleJdbcTemplate< /a> 是最轻量级的。您无需使用所有样板即可使用 SQL。您也不需要完整的 Spring 机制 - 只需使用您需要的即可。

如果 SimpleJdbcTemplate 对您来说太轻量,请尝试 iBatis。它是 JDBC 和 Hibernate 之间的中间步骤。

Spring's SimpleJdbcTemplate is as lightweight as it gets. You can use SQL without all the boilerplate. You don't need the full Spring machinery, either - just use what you need.

If SimpleJdbcTemplate is too light for you, try iBatis. It's an intermediate step between JDBC and Hibernate.

童话里做英雄 2025-01-01 23:49:24

我专门设计了 sormula 作为一个轻量级的 ORM。它支持 CRUD 且对 POJO 友好。你不写任何 DAO。零配置、零注释是可能的。

I designed sormula specifically to be a lightweight ORM. It is CRUD-ready and POJO-friendly. You don't write any DAO's. Zero-configuration, zero-annotation is possible.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文