![]() |
1
10
我使用的是0.5.1,以下功能适用于我:
|
![]() |
2
15
目前还没有文档记录,但是在插件安装文件中,有3种方法可以添加到每个控制器中,这样实际上就不必注入authenticationservice:
这意味着你可以打电话
获取主体对象。它还具有“isuserlogin”来查看用户是否被记录,以及“authuserdomain”来获取与已登录用户主体关联的实际域类实例(个人/用户)。 |
![]() |
3
13
以下代码来自 Spring Security Core Plugin (Version: 1.1.2) - Reference Documentation - Section 6.2 grails.plugins.springsecurity.springsecurityservice提供安全实用程序功能。它是一个常规的Grails服务,因此使用依赖注入将其注入到控制器、服务、Taglib等中:
|
![]() |
4
5
现在,我认为这样做的方法是:
|
![]() |
5
2
您也可以通过这种方式获得当前用户
|
![]() |
6
0
使用此代码:
|
![]() |
Rado · 无法捕获Grails 3中的数据库异常 7 年前 |
![]() |
user1452701 · 是否可以创建自定义条件查询,如 7 年前 |
![]() |
Magat Law · grails表单中的操作不起作用 7 年前 |
![]() |
ziftech · Grails REST安全性-将用户id添加到令牌 7 年前 |
|
Bill Hutchinson · Grails 3限制索引视图中的列 7 年前 |
![]() |
Trebla · Grails动态“inList” 7 年前 |