private void initializeBeansEagerly() {
        FunctionUtils.doAndHandle(__ -> {
            for (val beanName : applicationContext.getBeanDefinitionNames()) {
                Objects.requireNonNull(applicationContext.getBean(beanName).getClass());
            }
            if (applicationContext.containsBean("dispatcherServlet")) {
                val servlet = applicationContext.getBean(DispatcherServlet.class);
                servlet.setApplicationContext(applicationContext);
                servlet.init();
            }
        });
    }
This is {@link DefaultCasConfigurationEventListener}.

@author Misagh Moayyed
@since 5.1.0
core/cas-server-core-events-configuration/src/main/java/org/apereo/cas/support/events/listener/DefaultCasConfigurationEventListener.java