Reputation: 950
When I include the actuator
and enable debug
logging messages then there are lots of Did not find handler method for
log messages.
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]
When I remove the actuator
then these log messages disappear.
I have tried with versions Spring Boot 1.2.5 and 1.3.0.M3 and it works the same. It is easy to try out by generating a project with spring initializr
using web
and actuator
dependencies.
Do you know what could be the reason?
Thank you.
Upvotes: 6
Views: 9646
Reputation: 116091
The Actuator adds EndpointHandlerMapping
to route requests to the various endpoints that it provides. When a request is received, Spring MVC asks each handler mapping in turn for the handler for the request, stopping as soon as one is provided. The log messages are produced when a request for /index.html
is made. There's no endpoint mapped to that path so EndpointHandlerMapping
returns null
and Spring MVC moves on to the next mapping.
Upvotes: 7