Expose getters for the configured HandlerMapping's
Issue: SPR-15934
This commit is contained in:
@@ -770,6 +770,19 @@ public class DispatcherServlet extends FrameworkServlet {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the configured {@link HandlerMapping} beans that were detected by
|
||||
* type in the {@link WebApplicationContext} or initialized based on the
|
||||
* default set of strategies from {@literal DispatcherServlet.properties}.
|
||||
* @return immutable list with the configured mappings or an empty list
|
||||
* @since 5.0
|
||||
*/
|
||||
public List<HandlerMapping> getHandlerMappings() {
|
||||
return this.handlerMappings != null ?
|
||||
Collections.unmodifiableList(this.handlerMappings) :
|
||||
Collections.emptyList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this servlet's ThemeSource, if any; else return {@code null}.
|
||||
* <p>Default is to return the WebApplicationContext as ThemeSource,
|
||||
|
||||
Reference in New Issue
Block a user