独立使用 Grails GORM [英] Using Grails GORM standalone

查看:29
本文介绍了独立使用 Grails GORM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前想知道如何在 Grails 框架之外独立使用 Grails 中的 Groovy ORM 层.有一个 文档条目 用于这样做,但是 ZIP 文件只链接到一个空页面.我下载了 Grails 1.2-M3,但在文档中也找不到任何内容.

I'm currently wondering how it is possible to use the Groovy ORM Layer from Grails standalone outside of the Grails Framework. There is a Documentation Entry for doing so, but the ZIP file only links to an empty page. I downloaded Grails 1.2-M3 but I couldn't find anything in the docs either.

有人知道当前的状态以及如何实现吗?

Does anybody know what the current state is and how to accomplish this?

推荐答案

AFAIK 从 Grails 1.1 开始就可以独立使用 GORM.这允许您使用 GORM 作为 ORM,而无需使用完整的 Grails 框架

AFAIK it is possible to use GORM standalone since Grails 1.1. This allows you to use GORM as your ORM without using the full Grails framework

但是,我认为在 Spring(这是构建 Grails 的基础)之外使用 GORM 是不可能的.总结:

However, I don't think it's possible to use GORM outside of Spring (which is the foundation on which Grails is built). To summarise:

  • 你可以在不使用 Grails 的情况下使用 GORM
  • 不使用 Spring 就不能使用 GORM

此处提供了演示如何在 Grails 之外使用 GORM 的示例应用程序.如果您想在浏览器中浏览本示例的源代码(而不是从 SVN 存储库中检出),从这里开始.

这篇关于独立使用 Grails GORM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆