直接上异常:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'loginController': Unsatisfied dependency expressed through field 'wxMpService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'wxMpConfiguration' defined in URL [jar:file:/app.jar!/BOOT-INF/classes!/com/trtjk/tp/distribution/api/config/WxMpConfiguration.class]: Unsatisfied dependency expressed through constructor parameter 11; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cardSubmitMembercardUserInfoHandler': Unsatisfied dependency expressed through field 'memberFeignService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.trtjk.tp.distribution.server.feign.MemberFeignService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: RequestParam.value() was empty on parameter 0
描述:
使用Feign调用,Get请求的参数使用了@RequestParam注解,引发了上面的问题。
将@RequestParam改成@RequestParam("param")
解决了问题,其中param是接口参数名。
解决Feign@RequestParam异常
本文描述了一种在使用Feign进行Get请求时遇到的问题,即RequestParam注解导致的异常,并提供了解决方案,通过明确指定@RequestParam参数名称来避免空参数异常。
9984

被折叠的 条评论
为什么被折叠?



