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

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

Introduction

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

Prototype

public void setDetectAllHandlerAdapters(boolean detectAllHandlerAdapters) 

Source Link

Document

Set whether to detect all HandlerAdapter 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;
}