/** MultipartResolver used by this servlet. */ @Nullable private MultipartResolver multipartResolver;
/** LocaleResolver used by this servlet. */ @Nullable private LocaleResolver localeResolver;
/** ThemeResolver used by this servlet. */ @Nullable private ThemeResolver themeResolver;
/** List of HandlerMappings used by this servlet. */ @Nullable private List<HandlerMapping> handlerMappings;
/** List of HandlerAdapters used by this servlet. */ @Nullable private List<HandlerAdapter> handlerAdapters;
/** List of HandlerExceptionResolvers used by this servlet. */ @Nullable private List<HandlerExceptionResolver> handlerExceptionResolvers;
/** RequestToViewNameTranslator used by this servlet. */ @Nullable private RequestToViewNameTranslator viewNameTranslator;
/** FlashMapManager used by this servlet. */ @Nullable private FlashMapManager flashMapManager;
/** List of ViewResolvers used by this servlet. */ @Nullable private List<ViewResolver> viewResolvers; /** * This implementation calls {@link #initStrategies}. */ @Override protected void onRefresh(ApplicationContext context) { initStrategies(context); }
/** * Initialize the strategy objects that this servlet uses. * <p>May be overridden in subclasses in order to initialize further strategy objects. */ protected void initStrategies(ApplicationContext context) { // 初始化 MultipartResolver initMultipartResolver(context); // 初始化 LocaleResolver initLocaleResolver(context); // 初始化 ThemeResolver initThemeResolver(context); // 初始化 HandlerMappings initHandlerMappings(context); // 初始化 HandlerAdapters initHandlerAdapters(context); // 初始化 HandlerExceptionResolvers initHandlerExceptionResolvers(context); // 初始化 RequestToViewNameTranslator initRequestToViewNameTranslator(context); // 初始化 ViewResolvers initViewResolvers(context); // 初始化 FlashMapManager initFlashMapManager(context); }