6

当我包含actuator并启用debug日志消息时,会有很多Did not find handler method for日志消息。

2015-08-14 18:34:25.335 DEBUG 94889 --- [nio-8080-exec-5] o.s.b.a.e.mvc.EndpointHandlerMapping     : Looking up handler method for path /index.html
2015-08-14 18:34:25.336 DEBUG 94889 --- [nio-8080-exec-5] o.s.b.a.e.mvc.EndpointHandlerMapping     : Did not find handler method for [/index.html]

当我删除actuator然后这些日志消息消失。

我尝试过使用 Spring Boot 1.2.5 和 1.3.0.M3 版本,它的工作原理相同。spring initializr通过使用 usingwebactuator依赖项生成项目很容易尝试。

你知道可能是什么原因吗?

谢谢你。

4

1 回答 1

7

Actuator 添加EndpointHandlerMapping路由请求到它提供的各种端点。当收到请求时,Spring MVC 依次向每个处理程序映射询问请求的处理程序,一旦提供就停止。发出请求时会生成日志消息/index.html。没有端点映射到该路径,因此EndpointHandlerMapping返回null,Spring MVC 继续进行下一个映射。

于 2015-08-14T22:11:43.103 回答