lvchangcong

Results 3 comments of lvchangcong

@tangj1992 你好,请问TarsServantRequest中的init方法也写死了TarsCodec 咋办,如果我把TarsServantRequest和TarsServantResponse也重写的话,又过不了TarsClientFilterChain

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

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