Brian Clozel opened SPR-16023 and commented
Currently ResourceWebHandler handles directly the response when resources are not found, sending an HTTP 404 response.
This is technically correct but this prevents from dealing with those in a central place, like a WebExceptionHandler. This change is required for a global error handling mechanism such as the one in Spring Boot.
Reference URL: spring-projects/spring-boot#8625
Referenced from: commits 3febec3