tangj1992

Results 6 comments of tangj1992

不需要,自己重写TarsCodec,然后在servant的注解上使用自己的codec就可以了

> @tangj1992 你好,请问TarsServantRequest中的init方法也写死了TarsCodec 咋办,如果我把TarsServantRequest和TarsServantResponse也重写的话,又过不了TarsClientFilterChain 我看到TarsServantRequest里用的是TarsCodec里的decodeResquestBody,没有用到decodeRequest啊。如果会用到decodeRequest,那就没法了。

> > > @tangj1992 你好,请问TarsServantRequest中的init方法也写死了TarsCodec 咋办,如果我把TarsServantRequest和TarsServantResponse也重写的话,又过不了TarsClientFilterChain > > > > > > 我看到TarsServantRequest里用的是TarsCodec里的decodeResquestBody,没有用到decodeRequest啊。如果会用到decodeRequest,那就没法了。 > > ((TarsCodec) this.session.getProtocolFactory().getDecoder()).decodeRequestBody(this); 执行到这里会提示我重写的类没办法又转换回TarsCodec 子类不能转成父类?你是不是没继承TarsCodec?