code: @Override
      public void onApplicationEvent(@Nonnull ApplicationEvent event) {
          if (event instanceof ContextRefreshedEvent) {
              synchronized (this) {
                  ApplicationContext applicationContext = ((ContextRefreshedEvent) event).getApplicationContext();
                  setApplicationContext(new WebApplicationContextAdapter(applicationContext, this.servletConfig.getServletContext()));
  
                  // Configure the MVC infrastructure
                  configureMultipartResolver();
                  configureExceptionResolvers();
                  configureHandlerAdapters();
                  registerCustomArgumentResolvers();
                  configureHandlerMappings();
                  addNebaViewResolver();
  
                  // Picks up the previously registered MVC infrastructure
                  onRefresh(applicationContext);
  
                  this.initialized = true;
              }
          }
      }
docs: Configures the context's bean factory with MVC infrastructure beans.
  
  @param event can be <code>null</code>, in which case the event is ignored.