June 2018
Intermediate to advanced
408 pages
11h 23m
English
With Spring 5.0, there are three ways to configure DispatcherServlet programmatically, by implementing or extending any of the following three classes:
We will use the AbstractDispatcherServletInitializer class, as it is the preferred approach for applications that use Java-based Spring configuration. It is preferred because it allows us to start a servlet application context, as well as a root application context.
We need to create the following class to configure DispatcherServlet:
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; ...
Read now
Unlock full access