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

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

Introduction

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

Prototype

public DispatcherServlet() 

Source Link

Document

Create a new DispatcherServlet that will create its own internal web application context based on defaults and values provided through servlet init-params.

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;
}