关键:@Activate、CommonConstants.CONSUMER、CommonConstants.PROVIDER
直接上代码......................
服务提供方:
package com.weifor.xx.api.dubbo;
import com.weifor.util.WeiFor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.constants.CommonConstants;
import org.apache.dubbo.common.extension.Activate;
import org.apache.dubbo.rpc.*;
import java.util.concurrent.CompletableFuture;
/**
*
* Dubbo过滤器,执行者
*
* Copyright http://www.weifor.com/
* Author PangShuqiang
* Blog https://blog.csdn.net/PangSir
* Email pangshuqiang@163.com
* QQ 127015919
* Date: 2021/6/25
*/
@Slf4j
@Activate(group = CommonConstants.PROVIDER)
public class DubboProviderFilter implements Filter {
@Override
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
String appName = RpcContext.getContext().getAt