Spring boot 使用带有假jaxrs@Path的Spring属性占位符

Spring boot 使用带有假jaxrs@Path的Spring属性占位符,spring-boot,jax-rs,feign,Spring Boot,Jax Rs,Feign,我正在尝试使用jaxrs契约解析外部接口上的Spring占位符: @FeignClient(value = "myClient" , url = "${server.url}" , configuration = MyFeignConf.class) public interface MyClient { @GET @Path("${server.querypath}") @Produces("application/json") JsonNode olaTvQuery(@Qu

我正在尝试使用jaxrs契约解析外部接口上的Spring占位符:

@FeignClient(value = "myClient"
    , url = "${server.url}"
    , configuration = MyFeignConf.class)
public interface MyClient {

@GET
@Path("${server.querypath}")
@Produces("application/json")
JsonNode olaTvQuery(@QueryParam("nbResults") int nbResults)

}
但是发现SpringBoot的占位符填充机制只解析了
server.url
<代码>${server.querypath}未解析,并作为文本值提供给
GET


有人这样做吗?我应该打开一个功能请求吗?感谢您的回答。

由于注释将URL映射到方法,因此它具有特定的语法,允许引用路径变量等功能。例如:

@Path("/user/{id}")
public Response getUser(@PathParam("id") int userId) {
    // ... 
}
由于
$
字符被允许出现在URL中,Jersey(JAX-RS)实际上正在查看您编写的
@Path(“{And Path variable go here}”)
,这就是事情变得不明确且很难跟踪的地方,因此spring不会干扰映射字符串