使用fegin对外暴露接口,方法书写时参数未加注解,在spring底层校验时产生异常。
会先报创建bean异常
org.springframework.beans.factory.UnsatisfiedDependencyException
再报
java.lang.IllegalStateException
其内容为:Method has too many Body parameters
// 在方法中的参数中加入注解@RequestParam
@GetMapping("/user/login")
public AppResponse<UserRespVo> login(@RequestParam String username,@RequestParam String password);
【异常】-- Method has too many Body parameters
原文:https://www.cnblogs.com/erlangha/p/14414930.html