项目场景:
提示:这里简述项目相关背景:
项目场景:feign调用时方法里面传了参数,没用任何注解到导致参数传递不过去导致报错
问题描述
提示:这里描述项目中遇到的问题:
参数里没写注解的样子
@RequestMapping("/problemCancel/refundMoneyToStudent")
boolean refundMoneyToStudent(Long problemId,
Long userId,
Double refundMoney);
报错的语句:意思:方法的Body参数太多
java.lang.IllegalStateException: Method has too many Body parameters: public abstract boolean com.zh
原因分析:
提示:这里填写问题的分析:
feign参数传递有一种注解方式,使用@RequestParam(“problemId”)注解就好了
解决方案:
提示:这里填写该问题的具体解决方案:
@RequestMapping("/problemCancel/refundMoneyToStudent")
boolean refundMoneyToStudent(@RequestParam("problemId") Long problemId,
@RequestParam("userId") Long userId,
@RequestParam("refundMoney") Double refundMoney);