Spring Security 支持 的 EL 表达式

参考一下  https://docs.spring.io/spring-security/site/docs/4.2.x/reference/html/el-access.html

Spring Security 支持的所有SpEL表达式
安全表达式 	计算结果
authentication  	用户认证对象
denyAll  	结果始终为false
hasAnyRole(list of roles)  	如果用户被授权指定的任意权限,结果为true
hasRole(role)	如果用户被授予了指定的权限,结果 为true
hasIpAddress(IP Adress)	用户地址
isAnonymous()  	是否为匿名用户
isAuthenticated()  	不是匿名用户
isFullyAuthenticated  	不是匿名也不是remember-me认证
isRemberMe()  	remember-me认证
permitAll	始终true
principal	用户主要信息对象

 

转载于:https://my.oschina.net/lemos/blog/2395899

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值