Alex Rader opened SPR-15981 and commented
At the moment we need to write
.addDispatcherServletCustomizer(dispatcherServlet -> {
dispatcherServlet.setThrowExceptionIfNoHandlerFound(true);
})
But I already have in Properties
spring.mvc.throw-exception-if-no-handler-found=true
It works in Spring Boot, but doesn't work in tests using MockMvc
No further details from SPR-15981