Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Did not find handler method for" log messages with Spring Boot Actuator

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.

like image 816
Zoltan Altfatter Avatar asked Aug 14 '15 20:08

Zoltan Altfatter


1 Answers

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.

like image 114
Andy Wilkinson Avatar answered Sep 18 '22 09:09

Andy Wilkinson