Comments (5)
这个bug还没空来看?你跑过demo吗,demo里面难道也调用不到?--- by @li-shen from QQ
是的,也调不到,我追源码,restprotocol是把extend的值统一交给RESTEasy框架来管理,应该是靠后者来实现jax-rs规范吧?也就是说问题不在dubbox,而是要从RESTEasy下手吧?
from dubbox.
经过我自己的测试,发现单独使用resteasy,最新版本下也存在这个问题,不过目前看来,更换成官方提供的preProcessInterceptor是可以满足要求的,具体细节还需要看一下resteasy源码,不过该拦截器接口已经被官方提示不建议使用。如下代码
public class MyPreProcessInterceptor implements PreProcessInterceptor {
public ServerResponse preProcess(HttpRequest request, ResourceMethodInvoker method) throws Failure, WebApplicationException{
System.out.println("Reader interceptor invoked");
return null;
}
}
官方文档上解释的也很笼统,我在ResourceMethodInvoker
源码中甚至根本就不没有找到对应的readerInterceptors
声明(只有writerInterceptors
),而且发现preProcessInterceptor
被当做Filter来处理了,好乱啊~~
根据文档中下面这句话:
ReaderInterceptors wrap around the execution of MessageBodyReaders.
我还尝试了使用POST以表单形式提交参数,试图测试是否可以触发,结果也是徒劳的~
from dubbox.
我看了一下,这个不是bug。在不需要做反序列化的比如get场景,reader inteceptor肯定就不会被调用。
from dubbox.
如果做认证的话,就不能用这个拦截器了~
那一般都应该考虑如何做呢?
from dubbox.
用filter吧,不用interceptor。另外dubbo自己也有filter
from dubbox.
Related Issues (20)
- 我用最新的dubbo-spring-boot提供服务,消费端用dubbo2.8.4消费,报invok。。。的错误
- 请问dubbo-monitor-simple-2.8.3是你们的版本吗 HOT 1
- dubbox2.8.4 为啥不能打包成功 HOT 5
- springboot整合dubbox类型转换异常
- 从dubbox 2.8.4转移到阿里重新维护的dubbo2.5.* 是否可以? HOT 6
- dubbox如何设置servlet静态资源
- 请变更groupId
- 2.8.4接入腾讯TSF出现类型错误的情况。
- Dubbox不支持DubboComponentScan
- Please check if the providers have been started and registered.
- 是否支持protobuf序列化
- 2.8.4优雅停机 HOT 4
- dubbox 2.8.4版本作为消费者调用2.6.3及之后的版本报Unknown result flag, expect '0' '1' '2', get 4 HOT 2
- 111
- 应用停止过程rest请求报错
- CVE-2019-17564在dubbox中是否存在
- CVE-2020-1948在dubbox中是否存在
- dubbox中<dubbo:service document="这个document属性是做什么的"> HOT 1
- dubbox中<dubbo:reference check=false> 设置消费者check=false没有生效
- dubbo测试callback报错
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dubbox.