Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/rest/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java @RequestMapping中的Spring值绑定_Java_Rest_Spring Mvc_Controller_Expression - Fatal编程技术网

Java @RequestMapping中的Spring值绑定

Java @RequestMapping中的Spring值绑定,java,rest,spring-mvc,controller,expression,Java,Rest,Spring Mvc,Controller,Expression,我有一个健康检查控制器,如下所示: @RestController @RequestMapping("/api/${app-name}/management") public class HealthCheckController { @GetMapping(path = "health", produces = MediaType.TEXT_PLAIN_VALUE) public Mono<String> healthChe

我有一个健康检查控制器,如下所示:

@RestController
@RequestMapping("/api/${app-name}/management")
public class HealthCheckController {

    @GetMapping(path = "health", produces = MediaType.TEXT_PLAIN_VALUE)
    public Mono<String> healthCheck() {
        return Mono.just("Ok");
    }
}
@RestController
@请求映射(“/api/${app name}/management”)
公共类HealthCheckController{
@GetMapping(path=“health”,products=MediaType.TEXT\u PLAIN\u VALUE)
公共健康检查(){
返回Mono.just(“Ok”);
}
}
我在一个公共库中有一个控制器,该库包含在我们的所有服务中。在每个服务属性中,我都为
app name
指定了值。所以URL像
http://host:port/api/service1/management/health
将返回
Ok
。这在我的本地机器上运行良好,但在服务器上,出现404错误。我们的服务部署在Kubernetes


我有什么遗漏吗?
@RequestMapping
${app name}
)中的值绑定是否正确使用?

检查此项one@rcvaram在链接问题中,pod由于未准备就绪而重新启动。但我们还没有任何活性探针。其他的API都工作得很好,只有这一个是404。