@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @Bean
        public JpaVendorAdapter jpaEventVendorAdapter(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties,
            @Qualifier(JpaBeanFactory.DEFAULT_BEAN_NAME)
            final JpaBeanFactory jpaBeanFactory) {
            return BeanSupplier.of(JpaVendorAdapter.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> jpaBeanFactory.newJpaVendorAdapter(casProperties.getJdbc()))
                .otherwiseProxy()
                .get();
        }
This is {@link CasJpaEventsAutoConfiguration}, defines certain beans via configuration
while delegating some to Spring namespaces inside the context config file.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-events-jpa/src/main/java/org/apereo/cas/config/CasJpaEventsAutoConfiguration.java