弹簧启动器启动时的异常行为

时间:2018-10-31 06:51:06

标签: spring spring-boot-actuator

我正在使用Spring Boot应用程序,该应用程序在图片中演化了执行器。它演化了端点角色。 以下是我的控制器部分,用于处理healthStaus

 public ModelAndView healthStatus() {
        ModelAndView view= new ModelAndView();
        final String uri = "http://localhost:8090/actuator";
        RestTemplate restTemplate = new RestTemplate();
        String response=restTemplate.getForObject(uri,String.class);
       try {
           Object ob=new ObjectMapper().readValue(response, Employee.class); }
           catch (IOException e){
           e.printStackTrace();
           }
        view.addObject("objects",ob);
        view.setViewName("dashboard");
        return view;
    }

在执行此部分代码时,请求句柄表现出奇怪的行为。它会自动下载一个具有url名称的文件。enter image description here

0 个答案:

没有答案