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

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

问题描述

我现在想知道如何在Grails框架之外使用来自Grails独立版的Groovy ORM层。这样做有一个文档录入,但是 ZIP文件只链接到一个空白页面。我下载了Grails 1.2-M3,但我在文档中找不到任何东西。



有人知道当前状态是什么以及如何完成这项任务吗?

解决方案
这允许您在不使用完整的Grails框架的情况下使用GORM作为您的ORM。然而,我认为在Spring之外使用GORM并不可行这是Grails构建的基础)。总结一下:


  • 不使用Grails就可以使用GORM

  • 不使用GORM不使用Spring



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


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 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

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:

  • You can use GORM without using Grails
  • You cannot use GORM without using Spring

A sample application demonstrating how to use GORM outside Grails is available here. If you want to browse the source code of this example in a browser (instead of checking it out from the SVN repository), start here.

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

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