TarsJava icon indicating copy to clipboard operation
TarsJava copied to clipboard

请问什么时候可以支持超过10M的包大小,以及什么时候会发新版本

Open peter-up opened this issue 4 years ago • 12 comments

个人感觉Java项目没有其他语言投入多,感谢支持。

peter-up avatar Mar 09 '21 03:03 peter-up

可配置的包功能 会在2.0的版本中可供使用。但是不会放到1.7的版本中。

TimmyYu avatar Mar 30 '21 03:03 TimmyYu

自己重写TarsCodec去掉包大小限制

tangj1992 avatar Jul 02 '21 07:07 tangj1992

自己重写TarsCodec去掉包大小限制

需要fork一个tarsjava版本

peter-up avatar Jul 14 '21 09:07 peter-up

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

tangj1992 avatar Jul 14 '21 09:07 tangj1992

还有prx的注解

tangj1992 avatar Jul 14 '21 09:07 tangj1992

限制是在TarsCodec里的encodeRequest方法里

tangj1992 avatar Jul 14 '21 09:07 tangj1992

非常感谢 @tangj1992 ,我这边试试

peter-up avatar Jul 16 '21 02:07 peter-up

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

lvchangcong avatar Jul 19 '21 09:07 lvchangcong

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

我看到TarsServantRequest里用的是TarsCodec里的decodeResquestBody,没有用到decodeRequest啊。如果会用到decodeRequest,那就没法了。

tangj1992 avatar Jul 19 '21 09:07 tangj1992

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

我看到TarsServantRequest里用的是TarsCodec里的decodeResquestBody,没有用到decodeRequest啊。如果会用到decodeRequest,那就没法了。

((TarsCodec) this.session.getProtocolFactory().getDecoder()).decodeRequestBody(this); 执行到这里会提示我重写的类没办法又转换回TarsCodec

lvchangcong avatar Jul 19 '21 09:07 lvchangcong

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

我看到TarsServantRequest里用的是TarsCodec里的decodeResquestBody,没有用到decodeRequest啊。如果会用到decodeRequest,那就没法了。

((TarsCodec) this.session.getProtocolFactory().getDecoder()).decodeRequestBody(this); 执行到这里会提示我重写的类没办法又转换回TarsCodec

子类不能转成父类?你是不是没继承TarsCodec?

tangj1992 avatar Jul 19 '21 09:07 tangj1992

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

我看到TarsServantRequest里用的是TarsCodec里的decodeResquestBody,没有用到decodeRequest啊。如果会用到decodeRequest,那就没法了。

((TarsCodec) this.session.getProtocolFactory().getDecoder()).decodeRequestBody(this); 执行到这里会提示我重写的类没办法又转换回TarsCodec

子类不能转成父类?你是不是没继承TarsCodec?

非常感谢,问题已解决,我写成继承Codec了

lvchangcong avatar Jul 19 '21 09:07 lvchangcong