What are some of the use cases for the different DispatcherServlet.detectAllXxx flags?

In Spring Web MVC the DispatcherServlet has a bunch of flags like

detectAllHandlerMappings detectAllHandlerAdapters detectAllHandlerExceptionResolvers detectAllViewResolvers

which allows you to choose between finding all types of beans in the application context and finding at most one that matches a particular id. All are set to true by default.

I am trying to find a good use case; in particular, are there compelling situations in which I would establish one falsehood?

+1


source to share


1 answer


For example, "handlerMapping" is a predefined bean id, implicitly used if defined (without explicitly needing to be connected). If multiple handlers are used instead detectAllHandlerMappings == true

, Spring will load them by type and multiple URL-to-controller method strategies will be used



0


source







All Articles