public class CustomAuthorizeProvider extends Object implements AuthorizeProvider
自定义授权配置
【注意】必须在spring上下文中注入一个名为 customAuthority 的CustomResourceProvider对象CustomResourceProvider| Constructor and Description |
|---|
CustomAuthorizeProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
config(PropertyResource propertyResource,
org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry expressionInterceptUrlRegistry)
授权配置
|
CustomResourceProvider |
getCustomAuthority() |
int |
getOrder()
授权提供器的顺序,数字越小越是提前使用,默认值为100
|
void |
setCustomAuthority(CustomResourceProvider customAuthority) |
public void config(PropertyResource propertyResource, org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer.ExpressionInterceptUrlRegistry expressionInterceptUrlRegistry) throws Exception
AuthorizeProviderconfig in interface AuthorizeProviderpropertyResource - 授权资源expressionInterceptUrlRegistry - 注册器Exception - 配置时出现问题public int getOrder()
AuthorizeProvidergetOrder in interface AuthorizeProviderpublic CustomResourceProvider getCustomAuthority()
public void setCustomAuthority(CustomResourceProvider customAuthority)
Copyright © 2021. All rights reserved.