@Bean
        @ConditionalOnMissingBean(name = "dataSourceTicket")
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @Primary
        public CloseableDataSource dataSourceTicket(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(CloseableDataSource.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> JpaBeans.newDataSource(casProperties.getTicket().getRegistry().getJpa()))
                .otherwiseProxy()
                .get();
        }
This this {@link CasJpaTicketRegistryAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-jpa-ticket-registry/src/main/java/org/apereo/cas/config/CasJpaTicketRegistryAutoConfiguration.java