Example usage for org.springframework.web.servlet DispatcherServlet setDetectAllHandlerMappings

List of usage examples for org.springframework.web.servlet DispatcherServlet setDetectAllHandlerMappings

Introduction

In this page you can find the example usage for org.springframework.web.servlet DispatcherServlet setDetectAllHandlerMappings.

Prototype

public void setDetectAllHandlerMappings(boolean detectAllHandlerMappings) 

Source Link

Document

Set whether to detect all HandlerMapping beans in this servlet's context.

Usage

From source file:org.springframework.boot.actuate.autoconfigure.EndpointWebMvcChildContextConfiguration.java

@Bean(name = DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_BEAN_NAME)
public DispatcherServlet dispatcherServlet() {
    DispatcherServlet dispatcherServlet = new DispatcherServlet();
    // Ensure the parent configuration does not leak down to us
    dispatcherServlet.setDetectAllHandlerAdapters(false);
    dispatcherServlet.setDetectAllHandlerExceptionResolvers(false);
    dispatcherServlet.setDetectAllHandlerMappings(false);
    dispatcherServlet.setDetectAllViewResolvers(false);
    return dispatcherServlet;
}