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

升级到 1.2.76 后泛型转换异常 【严重】 #3724

Open
alex2016888 opened this issue Apr 19, 2021 · 3 comments
Open

升级到 1.2.76 后泛型转换异常 【严重】 #3724

alex2016888 opened this issue Apr 19, 2021 · 3 comments

Comments

@alex2016888
Copy link

`@Getter
@Setter
public class ApiResultResponse {

private T apiResult;

}`

远程调用代码
`@FeignClient
public interface DemoClient {

@PostMapping("/coupon/list")
ApiResultResponse<List<CouponDetail>> getList();

}`

调用接收代码
ApiResultResponse<List<CouponDetail>> couponDetailList = demoClient.getList();

这段逻辑在升级之前的版本1.2.70是正常的(couponDetailList 对象里面能正常取到值)。
升级到1.2.76后,这行代码
ApiResultResponse<List<CouponDetail>> couponDetailList = demoClient.getList(); 一直报类型转换异常。

在1.2.70 从couponDetailList中取出来的值是List对象,类型转换正常。
但是到了1.2.76版本取出来的是JSONArray

@Certseeds
Copy link
Contributor

  1. 请问能不能放出CouponDetail的定义
  2. 以及getList()的实现
  3. 还有传入的json字符串具体是什么

@subenkun
Copy link

同样问题,升级到1.2.76版本取出来的是JSONArray,降到1.2.75正常

@hnyyghk
Copy link
Contributor

hnyyghk commented Jul 5, 2021

Duplicate of #3810

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

4 participants