QoS匿名访问权限验证扩展点。
org.apache.dubbo.qos.permission.PermissionChecker
Dubbo QoS dubbo.application.qos-anonymous-access-permission-level
匿名访问权限校验。
org.apache.dubbo.qos.permission.DefaultAnonymousAccessPermissionChecker
Maven 项目结构:
src
|-main
|-java
|-com
|-xxx
|-XxxPermissionChecker.java (实现PermissionChecker接口)
|-resources
|-META-INF
|-dubbo
|-org.apache.dubbo.qos.permission.PermissionChecker` (纯文本文件,内容为:qosPermissionChecker=com.xxx.XxxPermissionChecker)
XxxPermissionChecker.java:
package com.xxx.qos.permission;
import org.apache.dubbo.qos.permission.PermissionChecker;
public class XxxAnonymousAccessPermissionChecker implements PermissionChecker {
@Override
public boolean access(CommandContext commandContext, PermissionLevel defaultCmdRequiredPermissionLevel) {
// ...
}
}
META-INF/dubbo/org.apache.dubbo.qos.permission.PermissionChecker:
qosPermissionChecker=com.xxx.XxxPermissionChecker