1

我有一个名为 Profile 的域类。我尝试在以下代码中访问其属性:

Profile p = new Profile()
// doing some changes
p.name = 'Larry'
//....
p.save(flush:true)
// then I print out the properties, and this line of code raises warning.
print p.properties

然后显示以下警告消息:

WARN  security.Security  - An attempt was made to use the grailsSecurity bean, but there is no security bridge implementation defined. You must install a security plugin and/or provide a grailsSecurityBridge bean.

我确实有一个弹簧安全插件。所以我不太确定这个安全问题的含义。不同的安全插件?

我找不到与此问题相关的任何信息。有人可以帮我吗?谢谢!

4

1 回答 1

1

我对“grailsS​​ecurityBridge bean”进行了搜索。结果让我找到了安装在我的应用程序中的 Grails 插件 platform-core:1.0.RC5。

所以我创建了另一个项目并尝试使用和不使用插件访问配置文件属性。结果表明插件是原因。

我不确定我的应用程序中是否需要这个插件,但至少我现在知道原因了。

更新:我正在使用另一个插件“电子邮件确认”,它取决于平台核心插件。所以卸载平台插件不是解决方案。

相反,我们应该实现 graisSecurityBridge bean。只需点击以下链接: http : //grailsrocks.github.io/grails-platform-core/guide/security.html#security_implementing_bridge http://grailsrocks.com/blog/2012/03/28/hooking-up-platform -core-security-api-to-your-security-provider

于 2013-07-31T19:16:56.170 回答