我可以在不同的权限Groovy有2个不同的数据源 [英] can I have 2 different datasources in groovy with different privileges

查看:104
本文介绍了我可以在不同的权限Groovy有2个不同的数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我们是否可以在Grails应用程序中配置2个数据源,我希望有一个只读访问(select),另一个具有读写访问(创建,插入,更新..)

解决方案

对于2.0之前的应用,使用 http://grails.org/plugin/datasources/ ,对于2.0,它内置于Grails中 - 请参阅 http://grails.org/doc/2.0.0.RC1/guide/conf.html#multipleDatasources


I was wondering if we can have 2 datasources configured in a Grails application, I want one to have readonly access (select) and the other to have read-write access (create, insert, update..)

解决方案

For pre-2.0 apps use http://grails.org/plugin/datasources/ and for 2.0 it's built into Grails - see the docs at http://grails.org/doc/2.0.0.RC1/guide/conf.html#multipleDatasources

这篇关于我可以在不同的权限Groovy有2个不同的数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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