java.lang.IllegalArgumentException: Not enough variable values available to expand '66'
配置springcloud的consumer的服务的controller层错误
@RequestMapping("/findGenShenById")
public GenShen findGenShenById(Integer uid) {
System.out.println("how about this =========" + uid);
return this.restTemplate.postForObject(URL_PREFIX+"/findGenShenById?uid={66}", uid, GenShen.class);
}
可以看到成功打印出来了所以就是后面post错误
解决的错误就是再次在后面加一个uid
return this.restTemplate.postForObject(URL_PREFIX+"/findGenShenById?uid={66}", uid, GenShen.class,uid );
之后就可以解决了,