Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

拦截器中出现异常时如何自定义返回值问题 #15

Closed
laimingzhang opened this issue Sep 1, 2020 · 0 comments
Closed

拦截器中出现异常时如何自定义返回值问题 #15

laimingzhang opened this issue Sep 1, 2020 · 0 comments

Comments

@laimingzhang
Copy link

当调用接口失败时,方法的返回值通常是null,例如方法:
@request(url = "${0}",
interceptor = {VerifyInvoiceInterceptor.class},
type = "post",
contentType = "application/json",
dataType = "json")
VerifyInvoiceResponse verifyInvoice(String url, @dataobject VerifyInvoiceDTO verifyInvoiceDTO);
如果方法调用异常,返回值verifyInvoiceResponse是null,是否可通过拦截器重新自定义返回值,使得verifyInvoiceResponse 不为null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants