我想使用占位符来定义请求的路径,如下所示。当我尝试请求时,似乎 spring-cloud-feign 无法将占位符与 application.yml 值交换。
@FeignClient("foo")
public interface FooClient{
@RequestMapping(value = "${my.special.placeholder}",
method = RequestMethod.GET,
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE)
ResponseEntity getSomeData(s);
}