Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

发布dubbo协议实现dubbo过滤器不生效 #188

Open
qinliang373 opened this issue May 27, 2019 · 2 comments
Open

发布dubbo协议实现dubbo过滤器不生效 #188

qinliang373 opened this issue May 27, 2019 · 2 comments

Comments

@qinliang373
Copy link

在sofaboot项目中发布dubbo协议,实现dubbo的filter接口不生效,而且dubbo与bolt使用不同的过滤器,对于开发人员来说要维护多份代码,很不方便。目前也不支持参数校验,有些麻烦。
1、可不可以实现一个统一的过滤器,对于多种协议同时有效
2、希望在后期版本能支持参数校验。

sofaboot:3.1.3

以下是使用dubbo未生效的代码
import com.alibaba.dubbo.rpc.Filter;
import com.alibaba.dubbo.rpc.Invocation;
import com.alibaba.dubbo.rpc.Invoker;
import com.alibaba.dubbo.rpc.Result;
import com.alibaba.dubbo.rpc.RpcException;

public class DubboValidationFilter implements Filter{
@OverRide
public Result invoke(Invoker<?> arg0, Invocation arg1) throws RpcException { System.out.println("==================dubbo=========dubbo==========");
return arg0.invoke(arg1);
}
}

=========================================================
xml配置

<bean id="userRegServiceImpl" class="com.jsmfbank.sse.usercenter.service.UserRegServiceImpl"></bean>
<sofa:service interface="com.jsmfbank.sse.usercenter.facade.UserRegService" ref="userRegServiceImpl">

	 <sofa:binding.dubbo>
		<sofa:rpc-global-filter ref="dubboValidationFilter"/>
	</sofa:binding.dubbo>
</sofa:service>
@qinliang373 qinliang373 changed the title 发布dubbo协议使用dubbo过滤器不生效 发布dubbo协议实现dubbo过滤器不生效 May 27, 2019
@QilongZhang
Copy link
Contributor

@JervyShi 关注下~

@JervyShi
Copy link
Member

@qinliang373 可以把 issue 移到这里讨论哈 https://github.com/sofastack/sofa-rpc-boot-projects/issues

@QilongZhang QilongZhang transferred this issue from sofastack/sofa-boot May 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants